From 2af9ba577730f071eef44b3ba492c3bfad0a8ec6 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 12 Oct 2010 23:29:55 +0000 Subject: Use size_t for BufferedComputation::add_data --- src/hash/rmd128/rmd128.cpp | 8 ++++---- src/hash/rmd128/rmd128.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/hash/rmd128') diff --git a/src/hash/rmd128/rmd128.cpp b/src/hash/rmd128/rmd128.cpp index 3e7eb9143..61737a4a0 100644 --- a/src/hash/rmd128/rmd128.cpp +++ b/src/hash/rmd128/rmd128.cpp @@ -58,7 +58,7 @@ inline void F4(u32bit& A, u32bit B, u32bit C, u32bit D, /* * RIPEMD-128 Compression Function */ -void RIPEMD_128::compress_n(const byte input[], u32bit blocks) +void RIPEMD_128::compress_n(const byte input[], size_t blocks) { using namespace RIPEMD_128_F; @@ -66,7 +66,7 @@ void RIPEMD_128::compress_n(const byte input[], u32bit blocks) MAGIC4 = 0x8F1BBCDC, MAGIC5 = 0x50A28BE6, MAGIC6 = 0x5C4DD124, MAGIC7 = 0x6D703EF3; - for(u32bit i = 0; i != blocks; ++i) + for(size_t i = 0; i != blocks; ++i) { load_le(&M[0], input, M.size()); @@ -156,8 +156,8 @@ void RIPEMD_128::compress_n(const byte input[], u32bit blocks) */ void RIPEMD_128::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/rmd128/rmd128.h b/src/hash/rmd128/rmd128.h index 23272c622..faead3245 100644 --- a/src/hash/rmd128/rmd128.h +++ b/src/hash/rmd128/rmd128.h @@ -25,7 +25,7 @@ class BOTAN_DLL RIPEMD_128 : public MDx_HashFunction RIPEMD_128() : MDx_HashFunction(16, 64, false, true), M(16), digest(4) { clear(); } private: - void compress_n(const byte[], u32bit blocks); + void compress_n(const byte[], size_t blocks); void copy_out(byte[]); SecureVector M, digest; -- cgit v1.2.3