aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/rmd128
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-12 23:29:55 +0000
committerlloyd <[email protected]>2010-10-12 23:29:55 +0000
commit2af9ba577730f071eef44b3ba492c3bfad0a8ec6 (patch)
tree92a4c4e973756225d42bb99a99110b2669be7299 /src/hash/rmd128
parent97e8d6086171772cd5e45bcf2f5b1ea1e38e6bf5 (diff)
Use size_t for BufferedComputation::add_data
Diffstat (limited to 'src/hash/rmd128')
-rw-r--r--src/hash/rmd128/rmd128.cpp8
-rw-r--r--src/hash/rmd128/rmd128.h2
2 files changed, 5 insertions, 5 deletions
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<u32bit> M, digest;