aboutsummaryrefslogtreecommitdiffstats
path: root/src/codec/hex/hex.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-05-26 14:25:05 +0000
committerlloyd <[email protected]>2012-05-26 14:25:05 +0000
commitc13a1a1a961f508c06ea9e1f04cb0652b169e32e (patch)
tree0d64f719cd1aa1d0947cb379b0f331c3cd5814ea /src/codec/hex/hex.h
parent9031c9098d0bf5416251fbba9e84246cce8be1f5 (diff)
Plain hex_decode now returns a std::vector, use hex_decode_locked to
get a secure_vector.
Diffstat (limited to 'src/codec/hex/hex.h')
-rw-r--r--src/codec/hex/hex.h37
1 files changed, 32 insertions, 5 deletions
diff --git a/src/codec/hex/hex.h b/src/codec/hex/hex.h
index bdb5e5365..a64a6c8df 100644
--- a/src/codec/hex/hex.h
+++ b/src/codec/hex/hex.h
@@ -102,9 +102,10 @@ size_t BOTAN_DLL hex_decode(byte output[],
exception if whitespace is encountered
* @return decoded hex output
*/
-secure_vector<byte> BOTAN_DLL hex_decode(const char input[],
- size_t input_length,
- bool ignore_ws = true);
+std::vector<byte> BOTAN_DLL
+hex_decode(const char input[],
+ size_t input_length,
+ bool ignore_ws = true);
/**
* Perform hex decoding
@@ -113,8 +114,34 @@ secure_vector<byte> BOTAN_DLL hex_decode(const char input[],
exception if whitespace is encountered
* @return decoded hex output
*/
-secure_vector<byte> BOTAN_DLL hex_decode(const std::string& input,
- bool ignore_ws = true);
+std::vector<byte> BOTAN_DLL
+hex_decode(const std::string& input,
+ bool ignore_ws = true);
+
+
+/**
+* Perform hex decoding
+* @param input some hex input
+* @param input_length the length of input in bytes
+* @param ignore_ws ignore whitespace on input; if false, throw an
+ exception if whitespace is encountered
+* @return decoded hex output
+*/
+secure_vector<byte> BOTAN_DLL
+hex_decode_locked(const char input[],
+ size_t input_length,
+ bool ignore_ws = true);
+
+/**
+* Perform hex decoding
+* @param input some hex input
+* @param ignore_ws ignore whitespace on input; if false, throw an
+ exception if whitespace is encountered
+* @return decoded hex output
+*/
+secure_vector<byte> BOTAN_DLL
+hex_decode_locked(const std::string& input,
+ bool ignore_ws = true);
}