diff options
author | lloyd <[email protected]> | 2010-10-12 19:41:37 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-10-12 19:41:37 +0000 |
commit | ff2210b035a1598bf99e18a578ff075bece8fbe5 (patch) | |
tree | 4efe3a23daac9e2cd8b9f2b794d95089ba4cdfb2 /src/block/lion/lion.cpp | |
parent | e7e3af16a3540e1d7a84e085aa1ea7c55f627930 (diff) |
Use size_t rather than u32bit for the blocks argument of encrypt_n
Diffstat (limited to 'src/block/lion/lion.cpp')
-rw-r--r-- | src/block/lion/lion.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/block/lion/lion.cpp b/src/block/lion/lion.cpp index 9d0dff297..b4a00ebee 100644 --- a/src/block/lion/lion.cpp +++ b/src/block/lion/lion.cpp @@ -14,12 +14,12 @@ namespace Botan { /* * Lion Encryption */ -void Lion::encrypt_n(const byte in[], byte out[], u32bit blocks) const +void Lion::encrypt_n(const byte in[], byte out[], size_t blocks) const { SecureVector<byte> buffer_vec(LEFT_SIZE); byte* buffer = &buffer_vec[0]; - for(u32bit i = 0; i != blocks; ++i) + for(size_t i = 0; i != blocks; ++i) { xor_buf(buffer, in, &key1[0], LEFT_SIZE); cipher->set_key(buffer, LEFT_SIZE); @@ -41,12 +41,12 @@ void Lion::encrypt_n(const byte in[], byte out[], u32bit blocks) const /* * Lion Decryption */ -void Lion::decrypt_n(const byte in[], byte out[], u32bit blocks) const +void Lion::decrypt_n(const byte in[], byte out[], size_t blocks) const { SecureVector<byte> buffer_vec(LEFT_SIZE); byte* buffer = &buffer_vec[0]; - for(u32bit i = 0; i != blocks; ++i) + for(size_t i = 0; i != blocks; ++i) { xor_buf(buffer, in, &key2[0], LEFT_SIZE); cipher->set_key(buffer, LEFT_SIZE); @@ -108,8 +108,8 @@ void Lion::clear() /* * Lion Constructor */ -Lion::Lion(HashFunction* hash_in, StreamCipher* sc_in, u32bit block_len) : - BlockCipher(std::max<u32bit>(2*hash_in->OUTPUT_LENGTH + 1, block_len), +Lion::Lion(HashFunction* hash_in, StreamCipher* sc_in, size_t block_len) : + BlockCipher(std::max<size_t>(2*hash_in->OUTPUT_LENGTH + 1, block_len), 2, 2*hash_in->OUTPUT_LENGTH, 2), LEFT_SIZE(hash_in->OUTPUT_LENGTH), RIGHT_SIZE(BLOCK_SIZE - LEFT_SIZE), |