aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-07-06 20:48:43 +0200
committerSimon Warta <[email protected]>2015-07-07 11:01:05 +0200
commit5d82a637f8fc4f14c672b297de876276cabcc627 (patch)
tree5a219b7bef9c0fae94306704835d3217e78a8761 /src/lib/utils
parentd45581efad59f9707708893131237aff5471a9fd (diff)
Fix to_string for BER_Object when debug STL is used
Diffstat (limited to 'src/lib/utils')
-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