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/md4 | |
parent | 97e8d6086171772cd5e45bcf2f5b1ea1e38e6bf5 (diff) |
Use size_t for BufferedComputation::add_data
Diffstat (limited to 'src/hash/md4')
-rw-r--r-- | src/hash/md4/md4.cpp | 8 | ||||
-rw-r--r-- | src/hash/md4/md4.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/hash/md4/md4.cpp b/src/hash/md4/md4.cpp index 326ca8eba..3f9259deb 100644 --- a/src/hash/md4/md4.cpp +++ b/src/hash/md4/md4.cpp @@ -45,11 +45,11 @@ inline void HH(u32bit& A, u32bit B, u32bit C, u32bit D, u32bit M, byte S) /* * MD4 Compression Function */ -void MD4::compress_n(const byte input[], u32bit blocks) +void MD4::compress_n(const byte input[], size_t blocks) { u32bit A = digest[0], B = digest[1], C = digest[2], D = digest[3]; - for(u32bit i = 0; i != blocks; ++i) + for(size_t i = 0; i != blocks; ++i) { load_le(&M[0], input, M.size()); @@ -94,8 +94,8 @@ void MD4::compress_n(const byte input[], u32bit blocks) */ void MD4::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/md4/md4.h b/src/hash/md4/md4.h index 44081e635..07467fdfc 100644 --- a/src/hash/md4/md4.h +++ b/src/hash/md4/md4.h @@ -25,7 +25,7 @@ class BOTAN_DLL MD4 : public MDx_HashFunction MD4() : MDx_HashFunction(16, 64, false, true), M(16), digest(4) { clear(); } protected: - void compress_n(const byte input[], u32bit blocks); + void compress_n(const byte input[], size_t blocks); void copy_out(byte[]); SecureVector<u32bit> M, digest; |