aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/codec/hex/hex.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-12-11 15:28:38 -0500
committerJack Lloyd <[email protected]>2016-12-18 16:48:24 -0500
commitf3cb3edb512bdcab498d825886c3366c341b3f78 (patch)
tree645c73ec295a5a34f25d99903b6d9fa9751e86d3 /src/lib/codec/hex/hex.h
parentc1dd21253c1f3188ff45d3ad47698efd08235ae8 (diff)
Convert to using standard uintN_t integer types
Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them.
Diffstat (limited to 'src/lib/codec/hex/hex.h')
-rw-r--r--src/lib/codec/hex/hex.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/codec/hex/hex.h b/src/lib/codec/hex/hex.h
index b524c43f0..2927640e2 100644
--- a/src/lib/codec/hex/hex.h
+++ b/src/lib/codec/hex/hex.h
@@ -21,7 +21,7 @@ namespace Botan {
* @param uppercase should output be upper or lower case?
*/
void BOTAN_DLL hex_encode(char output[],
- const byte input[],
+ const uint8_t input[],
size_t input_length,
bool uppercase = true);
@@ -32,7 +32,7 @@ void BOTAN_DLL hex_encode(char output[],
* @param uppercase should output be upper or lower case?
* @return hexadecimal representation of input
*/
-std::string BOTAN_DLL hex_encode(const byte input[],
+std::string BOTAN_DLL hex_encode(const uint8_t input[],
size_t input_length,
bool uppercase = true);
@@ -43,7 +43,7 @@ std::string BOTAN_DLL hex_encode(const byte input[],
* @return hexadecimal representation of input
*/
template<typename Alloc>
-std::string hex_encode(const std::vector<byte, Alloc>& input,
+std::string hex_encode(const std::vector<uint8_t, Alloc>& input,
bool uppercase = true)
{
return hex_encode(input.data(), input.size(), uppercase);
@@ -62,7 +62,7 @@ std::string hex_encode(const std::vector<byte, Alloc>& input,
exception if whitespace is encountered
* @return number of bytes written to output
*/
-size_t BOTAN_DLL hex_decode(byte output[],
+size_t BOTAN_DLL hex_decode(uint8_t output[],
const char input[],
size_t input_length,
size_t& input_consumed,
@@ -77,7 +77,7 @@ size_t BOTAN_DLL hex_decode(byte output[],
exception if whitespace is encountered
* @return number of bytes written to output
*/
-size_t BOTAN_DLL hex_decode(byte output[],
+size_t BOTAN_DLL hex_decode(uint8_t output[],
const char input[],
size_t input_length,
bool ignore_ws = true);
@@ -90,7 +90,7 @@ size_t BOTAN_DLL hex_decode(byte output[],
exception if whitespace is encountered
* @return number of bytes written to output
*/
-size_t BOTAN_DLL hex_decode(byte output[],
+size_t BOTAN_DLL hex_decode(uint8_t output[],
const std::string& input,
bool ignore_ws = true);
@@ -102,7 +102,7 @@ size_t BOTAN_DLL hex_decode(byte output[],
exception if whitespace is encountered
* @return decoded hex output
*/
-std::vector<byte> BOTAN_DLL
+std::vector<uint8_t> BOTAN_DLL
hex_decode(const char input[],
size_t input_length,
bool ignore_ws = true);
@@ -114,7 +114,7 @@ hex_decode(const char input[],
exception if whitespace is encountered
* @return decoded hex output
*/
-std::vector<byte> BOTAN_DLL
+std::vector<uint8_t> BOTAN_DLL
hex_decode(const std::string& input,
bool ignore_ws = true);
@@ -127,7 +127,7 @@ hex_decode(const std::string& input,
exception if whitespace is encountered
* @return decoded hex output
*/
-secure_vector<byte> BOTAN_DLL
+secure_vector<uint8_t> BOTAN_DLL
hex_decode_locked(const char input[],
size_t input_length,
bool ignore_ws = true);
@@ -139,7 +139,7 @@ hex_decode_locked(const char input[],
exception if whitespace is encountered
* @return decoded hex output
*/
-secure_vector<byte> BOTAN_DLL
+secure_vector<uint8_t> BOTAN_DLL
hex_decode_locked(const std::string& input,
bool ignore_ws = true);