diff options
Diffstat (limited to 'src/hash/has160')
-rw-r--r-- | src/hash/has160/has160.cpp | 8 | ||||
-rw-r--r-- | src/hash/has160/has160.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/hash/has160/has160.cpp b/src/hash/has160/has160.cpp index 5786ae0ee..4f8db53f7 100644 --- a/src/hash/has160/has160.cpp +++ b/src/hash/has160/has160.cpp @@ -58,14 +58,14 @@ inline void F4(u32bit A, u32bit& B, u32bit C, u32bit D, u32bit& E, /* * HAS-160 Compression Function */ -void HAS_160::compress_n(const byte input[], u32bit blocks) +void HAS_160::compress_n(const byte input[], size_t blocks) { using namespace HAS_160_F; u32bit A = digest[0], B = digest[1], C = digest[2], D = digest[3], E = digest[4]; - for(u32bit i = 0; i != blocks; ++i) + for(size_t i = 0; i != blocks; ++i) { load_le(&X[0], input, 16); @@ -144,8 +144,8 @@ void HAS_160::compress_n(const byte input[], u32bit blocks) */ void HAS_160::copy_out(byte output[]) { - for(u32bit j = 0; j != OUTPUT_LENGTH; j += 4) - store_le(digest[j/4], output + j); + for(size_t i = 0; i != OUTPUT_LENGTH; i += 4) + store_le(digest[i/4], output + i); } /* diff --git a/src/hash/has160/has160.h b/src/hash/has160/has160.h index 7cff320b8..83ed5ab56 100644 --- a/src/hash/has160/has160.h +++ b/src/hash/has160/has160.h @@ -26,7 +26,7 @@ class BOTAN_DLL HAS_160 : public MDx_HashFunction HAS_160() : MDx_HashFunction(20, 64, false, true), X(20), digest(5) { clear(); } private: - void compress_n(const byte[], u32bit blocks); + void compress_n(const byte[], size_t blocks); void copy_out(byte[]); SecureVector<u32bit> X, digest; |