aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-09-07 20:43:26 +0000
committerlloyd <[email protected]>2012-09-07 20:43:26 +0000
commit463c9fee5bc2035e012d230f44abf7e1778fdbf5 (patch)
tree89b8e7adf5fa9a6e7cc94d0ccb90bf08f2c64ed9 /src/utils
parent9126c751ce89bf8a6c226e4a73d68cb59fa8a8b6 (diff)
Add support for key material export
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/stl_util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/utils/stl_util.h b/src/utils/stl_util.h
index 1a62e8fe7..690d2af01 100644
--- a/src/utils/stl_util.h
+++ b/src/utils/stl_util.h
@@ -9,10 +9,17 @@
#define BOTAN_STL_UTIL_H__
#include <vector>
+#include <string>
#include <map>
namespace Botan {
+std::vector<byte> to_byte_vector(const std::string& s)
+ {
+ return std::vector<byte>(reinterpret_cast<const byte*>(&s[0]),
+ reinterpret_cast<const byte*>(&s[s.size()]));
+ }
+
/*
* Searching through a std::map
* @param mapping the map to search