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/lubyrack | |
parent | e7e3af16a3540e1d7a84e085aa1ea7c55f627930 (diff) |
Use size_t rather than u32bit for the blocks argument of encrypt_n
Diffstat (limited to 'src/block/lubyrack')
-rw-r--r-- | src/block/lubyrack/lubyrack.cpp | 12 | ||||
-rw-r--r-- | src/block/lubyrack/lubyrack.h | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/block/lubyrack/lubyrack.cpp b/src/block/lubyrack/lubyrack.cpp index cdaff1b1e..0b7ec7bf4 100644 --- a/src/block/lubyrack/lubyrack.cpp +++ b/src/block/lubyrack/lubyrack.cpp @@ -13,14 +13,14 @@ namespace Botan { /* * Luby-Rackoff Encryption */ -void LubyRackoff::encrypt_n(const byte in[], byte out[], u32bit blocks) const +void LubyRackoff::encrypt_n(const byte in[], byte out[], size_t blocks) const { - const u32bit len = hash->OUTPUT_LENGTH; + const size_t len = hash->OUTPUT_LENGTH; SecureVector<byte> buffer_vec(len); byte* buffer = &buffer_vec[0]; - for(u32bit i = 0; i != blocks; ++i) + for(size_t i = 0; i != blocks; ++i) { hash->update(K1); hash->update(in, len); @@ -50,14 +50,14 @@ void LubyRackoff::encrypt_n(const byte in[], byte out[], u32bit blocks) const /* * Luby-Rackoff Decryption */ -void LubyRackoff::decrypt_n(const byte in[], byte out[], u32bit blocks) const +void LubyRackoff::decrypt_n(const byte in[], byte out[], size_t blocks) const { - const u32bit len = hash->OUTPUT_LENGTH; + const size_t len = hash->OUTPUT_LENGTH; SecureVector<byte> buffer_vec(len); byte* buffer = &buffer_vec[0]; - for(u32bit i = 0; i != blocks; ++i) + for(size_t i = 0; i != blocks; ++i) { hash->update(K2); hash->update(in + len, len); diff --git a/src/block/lubyrack/lubyrack.h b/src/block/lubyrack/lubyrack.h index a69d2302f..c20af950d 100644 --- a/src/block/lubyrack/lubyrack.h +++ b/src/block/lubyrack/lubyrack.h @@ -19,8 +19,8 @@ namespace Botan { class BOTAN_DLL LubyRackoff : 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; |