aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/whirlpool
diff options
context:
space:
mode:
Diffstat (limited to 'src/hash/whirlpool')
-rw-r--r--src/hash/whirlpool/whrlpool.cpp10
-rw-r--r--src/hash/whirlpool/whrlpool.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/hash/whirlpool/whrlpool.cpp b/src/hash/whirlpool/whrlpool.cpp
index fcd244ce2..fdbdf5d0f 100644
--- a/src/hash/whirlpool/whrlpool.cpp
+++ b/src/hash/whirlpool/whrlpool.cpp
@@ -13,7 +13,7 @@ namespace Botan {
/*
* Whirlpool Compression Function
*/
-void Whirlpool::compress_n(const byte in[], u32bit blocks)
+void Whirlpool::compress_n(const byte in[], size_t blocks)
{
static const u64bit RC[10] = {
0x1823C6E887B8014F, 0x36A6D2F5796F9152,
@@ -23,7 +23,7 @@ void Whirlpool::compress_n(const byte in[], u32bit blocks)
0xFBEE7C66DD17479E, 0xCA2DBF07AD5A8333
};
- for(u32bit i = 0; i != blocks; ++i)
+ for(size_t i = 0; i != blocks; ++i)
{
load_be(&M[0], in, M.size());
@@ -35,7 +35,7 @@ void Whirlpool::compress_n(const byte in[], u32bit blocks)
B0 = K0 ^ M[0]; B1 = K1 ^ M[1]; B2 = K2 ^ M[2]; B3 = K3 ^ M[3];
B4 = K4 ^ M[4]; B5 = K5 ^ M[5]; B6 = K6 ^ M[6]; B7 = K7 ^ M[7];
- for(u32bit j = 0; j != 10; ++j)
+ for(size_t j = 0; j != 10; ++j)
{
u64bit T0, T1, T2, T3, T4, T5, T6, T7;
T0 = C0[get_byte(0, K0)] ^ C1[get_byte(1, K7)] ^
@@ -129,8 +129,8 @@ void Whirlpool::compress_n(const byte in[], u32bit blocks)
*/
void Whirlpool::copy_out(byte output[])
{
- for(u32bit j = 0; j != OUTPUT_LENGTH; j += 8)
- store_be(digest[j/8], output + j);
+ for(size_t i = 0; i != OUTPUT_LENGTH; i += 8)
+ store_be(digest[i/8], output + i);
}
/*
diff --git a/src/hash/whirlpool/whrlpool.h b/src/hash/whirlpool/whrlpool.h
index 98be0b480..30bf91a34 100644
--- a/src/hash/whirlpool/whrlpool.h
+++ b/src/hash/whirlpool/whrlpool.h
@@ -25,7 +25,7 @@ class BOTAN_DLL Whirlpool : public MDx_HashFunction
Whirlpool() : MDx_HashFunction(64, 64, true, true, 32), M(8), digest(8)
{ clear(); }
private:
- void compress_n(const byte[], u32bit blocks);
+ void compress_n(const byte[], size_t blocks);
void copy_out(byte[]);
static const u64bit C0[256];