aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/md5
diff options
context:
space:
mode:
Diffstat (limited to 'src/hash/md5')
-rw-r--r--src/hash/md5/md5.cpp8
-rw-r--r--src/hash/md5/md5.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/hash/md5/md5.cpp b/src/hash/md5/md5.cpp
index b1745b944..69ab89e63 100644
--- a/src/hash/md5/md5.cpp
+++ b/src/hash/md5/md5.cpp
@@ -58,11 +58,11 @@ inline void II(u32bit& A, u32bit B, u32bit C, u32bit D, u32bit msg,
/*
* MD5 Compression Function
*/
-void MD5::compress_n(const byte input[], u32bit blocks)
+void MD5::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());
@@ -116,8 +116,8 @@ void MD5::compress_n(const byte input[], u32bit blocks)
*/
void MD5::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/md5/md5.h b/src/hash/md5/md5.h
index 732ec026d..f79a3ec65 100644
--- a/src/hash/md5/md5.h
+++ b/src/hash/md5/md5.h
@@ -25,7 +25,7 @@ class BOTAN_DLL MD5 : public MDx_HashFunction
MD5() : MDx_HashFunction(16, 64, false, true), M(16), digest(4)
{ clear(); }
protected:
- void compress_n(const byte[], u32bit blocks);
+ void compress_n(const byte[], size_t blocks);
void copy_out(byte[]);
SecureVector<u32bit> M, digest;