aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/misc/aont
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/misc/aont
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/misc/aont')
-rw-r--r--src/lib/misc/aont/package.cpp16
-rw-r--r--src/lib/misc/aont/package.h8
2 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/misc/aont/package.cpp b/src/lib/misc/aont/package.cpp
index cec07d298..9c106e1d0 100644
--- a/src/lib/misc/aont/package.cpp
+++ b/src/lib/misc/aont/package.cpp
@@ -15,8 +15,8 @@ namespace Botan {
void aont_package(RandomNumberGenerator& rng,
BlockCipher* cipher,
- const byte input[], size_t input_len,
- byte output[])
+ const uint8_t input[], size_t input_len,
+ uint8_t output[])
{
const size_t BLOCK_SIZE = cipher->block_size();
@@ -37,12 +37,12 @@ void aont_package(RandomNumberGenerator& rng,
// Set K0 (the all zero key)
cipher->set_key(SymmetricKey(all_zeros));
- secure_vector<byte> buf(BLOCK_SIZE);
+ secure_vector<uint8_t> buf(BLOCK_SIZE);
const size_t blocks =
(input_len + BLOCK_SIZE - 1) / BLOCK_SIZE;
- byte* final_block = output + input_len;
+ uint8_t* final_block = output + input_len;
clear_mem(final_block, BLOCK_SIZE);
// XOR the hash blocks into the final block
@@ -67,8 +67,8 @@ void aont_package(RandomNumberGenerator& rng,
}
void aont_unpackage(BlockCipher* cipher,
- const byte input[], size_t input_len,
- byte output[])
+ const uint8_t input[], size_t input_len,
+ uint8_t output[])
{
const size_t BLOCK_SIZE = cipher->block_size();
@@ -83,8 +83,8 @@ void aont_unpackage(BlockCipher* cipher,
cipher->set_key(SymmetricKey(all_zeros));
- secure_vector<byte> package_key(BLOCK_SIZE);
- secure_vector<byte> buf(BLOCK_SIZE);
+ secure_vector<uint8_t> package_key(BLOCK_SIZE);
+ secure_vector<uint8_t> buf(BLOCK_SIZE);
// Copy the package key (masked with the block hashes)
copy_mem(package_key.data(),
diff --git a/src/lib/misc/aont/package.h b/src/lib/misc/aont/package.h
index 76e679490..48d4b44e0 100644
--- a/src/lib/misc/aont/package.h
+++ b/src/lib/misc/aont/package.h
@@ -24,8 +24,8 @@ namespace Botan {
*/
void BOTAN_DLL aont_package(RandomNumberGenerator& rng,
BlockCipher* cipher,
- const byte input[], size_t input_len,
- byte output[]);
+ const uint8_t input[], size_t input_len,
+ uint8_t output[]);
/**
* Rivest's Package Tranform (Inversion)
@@ -36,8 +36,8 @@ void BOTAN_DLL aont_package(RandomNumberGenerator& rng,
* input_len - cipher->BLOCK_SIZE bytes long)
*/
void BOTAN_DLL aont_unpackage(BlockCipher* cipher,
- const byte input[], size_t input_len,
- byte output[]);
+ const uint8_t input[], size_t input_len,
+ uint8_t output[]);
}