aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/stl_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/utils/stl_util.h')
-rw-r--r--src/lib/utils/stl_util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/utils/stl_util.h b/src/lib/utils/stl_util.h
index 76cf77ef8..d74cbe713 100644
--- a/src/lib/utils/stl_util.h
+++ b/src/lib/utils/stl_util.h
@@ -1,6 +1,7 @@
/*
* STL Utility Functions
* (C) 1999-2007 Jack Lloyd
+* (C) 2015 Simon Warta (Kullo GmbH)
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
@@ -11,6 +12,7 @@
#include <vector>
#include <string>
#include <map>
+#include <botan/secmem.h>
namespace Botan {
@@ -19,6 +21,11 @@ inline std::vector<byte> to_byte_vector(const std::string& s)
return std::vector<byte>(s.cbegin(), s.cend());
}
+inline std::string to_string(const secure_vector<byte> &bytes)
+ {
+ return std::string(bytes.cbegin(), bytes.cend());
+ }
+
/*
* Searching through a std::map
* @param mapping the map to search