diff options
Diffstat (limited to 'src/constructs/aont')
-rw-r--r-- | src/constructs/aont/package.cpp | 18 | ||||
-rw-r--r-- | src/constructs/aont/package.h | 18 |
2 files changed, 14 insertions, 22 deletions
diff --git a/src/constructs/aont/package.cpp b/src/constructs/aont/package.cpp index 5d1e674ca..e10087060 100644 --- a/src/constructs/aont/package.cpp +++ b/src/constructs/aont/package.cpp @@ -14,12 +14,10 @@ namespace Botan { -namespace AllOrNothingTransform { - -void package(RandomNumberGenerator& rng, - BlockCipher* cipher, - const byte input[], u32bit input_len, - byte output[]) +void aont_package(RandomNumberGenerator& rng, + BlockCipher* cipher, + const byte input[], u32bit input_len, + byte output[]) { if(!cipher->valid_keylength(cipher->BLOCK_SIZE)) throw Invalid_Argument("AONT::package: Invalid cipher"); @@ -66,9 +64,9 @@ void package(RandomNumberGenerator& rng, xor_buf(final_block, package_key.begin(), cipher->BLOCK_SIZE); } -void unpackage(BlockCipher* cipher, - const byte input[], u32bit input_len, - byte output[]) +void aont_unpackage(BlockCipher* cipher, + const byte input[], u32bit input_len, + byte output[]) { if(!cipher->valid_keylength(cipher->BLOCK_SIZE)) throw Invalid_Argument("AONT::unpackage: Invalid cipher"); @@ -116,5 +114,3 @@ void unpackage(BlockCipher* cipher, } } - -} diff --git a/src/constructs/aont/package.h b/src/constructs/aont/package.h index 9c23d1836..211623347 100644 --- a/src/constructs/aont/package.h +++ b/src/constructs/aont/package.h @@ -14,8 +14,6 @@ namespace Botan { -namespace AllOrNothingTransform { - /** * Rivest's Package Tranform * @arg rng the random number generator to use @@ -25,10 +23,10 @@ namespace AllOrNothingTransform { * @arg output the output data buffer (must be at least * input_len + cipher->BLOCK_SIZE bytes long) */ -void BOTAN_DLL package(RandomNumberGenerator& rng, - BlockCipher* cipher, - const byte input[], u32bit input_len, - byte output[]); +void BOTAN_DLL aont_package(RandomNumberGenerator& rng, + BlockCipher* cipher, + const byte input[], u32bit input_len, + byte output[]); /** * Rivest's Package Tranform (Inversion) @@ -39,11 +37,9 @@ void BOTAN_DLL package(RandomNumberGenerator& rng, * @arg output the output data buffer (must be at least * input_len - cipher->BLOCK_SIZE bytes long) */ -void BOTAN_DLL unpackage(BlockCipher* cipher, - const byte input[], u32bit input_len, - byte output[]); - -} +void BOTAN_DLL aont_unpackage(BlockCipher* cipher, + const byte input[], u32bit input_len, + byte output[]); } |