aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/lion
diff options
context:
space:
mode:
Diffstat (limited to 'src/block/lion')
-rw-r--r--src/block/lion/lion.cpp12
-rw-r--r--src/block/lion/lion.h8
2 files changed, 10 insertions, 10 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),
diff --git a/src/block/lion/lion.h b/src/block/lion/lion.h
index bba4e6f30..5d4d374b9 100644
--- a/src/block/lion/lion.h
+++ b/src/block/lion/lion.h
@@ -25,8 +25,8 @@ namespace Botan {
class BOTAN_DLL Lion : public BlockCipher
{
public:
- void encrypt_n(const byte in[], byte out[], u32bit blocks) const;
- void decrypt_n(const byte in[], byte out[], u32bit blocks) const;
+ void encrypt_n(const byte in[], byte out[], size_t blocks) const;
+ void decrypt_n(const byte in[], byte out[], size_t blocks) const;
void clear();
std::string name() const;
@@ -39,13 +39,13 @@ class BOTAN_DLL Lion : public BlockCipher
*/
Lion(HashFunction* hash,
StreamCipher* cipher,
- u32bit block_size);
+ size_t block_size);
~Lion() { delete hash; delete cipher; }
private:
void key_schedule(const byte[], u32bit);
- const u32bit LEFT_SIZE, RIGHT_SIZE;
+ const size_t LEFT_SIZE, RIGHT_SIZE;
HashFunction* hash;
StreamCipher* cipher;