diff options
author | lloyd <[email protected]> | 2010-10-12 23:29:55 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-10-12 23:29:55 +0000 |
commit | 2af9ba577730f071eef44b3ba492c3bfad0a8ec6 (patch) | |
tree | 92a4c4e973756225d42bb99a99110b2669be7299 /src/hash/whirlpool/whrlpool.cpp | |
parent | 97e8d6086171772cd5e45bcf2f5b1ea1e38e6bf5 (diff) |
Use size_t for BufferedComputation::add_data
Diffstat (limited to 'src/hash/whirlpool/whrlpool.cpp')
-rw-r--r-- | src/hash/whirlpool/whrlpool.cpp | 10 |
1 files changed, 5 insertions, 5 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); } /* |