diff options
Diffstat (limited to 'src/utils/stl_util.h')
-rw-r--r-- | src/utils/stl_util.h | 7 |
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 |