aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/lubyrack
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-12 19:41:37 +0000
committerlloyd <[email protected]>2010-10-12 19:41:37 +0000
commitff2210b035a1598bf99e18a578ff075bece8fbe5 (patch)
tree4efe3a23daac9e2cd8b9f2b794d95089ba4cdfb2 /src/block/lubyrack
parente7e3af16a3540e1d7a84e085aa1ea7c55f627930 (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.cpp12
-rw-r--r--src/block/lubyrack/lubyrack.h4
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;