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/tiger/tiger.cpp | |
parent | 97e8d6086171772cd5e45bcf2f5b1ea1e38e6bf5 (diff) |
Use size_t for BufferedComputation::add_data
Diffstat (limited to 'src/hash/tiger/tiger.cpp')
-rw-r--r-- | src/hash/tiger/tiger.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/hash/tiger/tiger.cpp b/src/hash/tiger/tiger.cpp index 9d3e2cbe4..fa5effd80 100644 --- a/src/hash/tiger/tiger.cpp +++ b/src/hash/tiger/tiger.cpp @@ -43,11 +43,11 @@ inline void mix(MemoryRegion<u64bit>& X) /* * Tiger Compression Function */ -void Tiger::compress_n(const byte input[], u32bit blocks) +void Tiger::compress_n(const byte input[], size_t blocks) { u64bit A = digest[0], B = digest[1], C = digest[2]; - for(u32bit i = 0; i != blocks; ++i) + for(size_t i = 0; i != blocks; ++i) { load_le(&X[0], input, X.size()); @@ -55,7 +55,7 @@ void Tiger::compress_n(const byte input[], u32bit blocks) pass(C, A, B, X, 7); mix(X); pass(B, C, A, X, 9); - for(u32bit j = 3; j != PASS; ++j) + for(size_t j = 3; j != PASS; ++j) { mix(X); pass(A, B, C, X, 9); @@ -75,8 +75,8 @@ void Tiger::compress_n(const byte input[], u32bit blocks) */ void Tiger::copy_out(byte output[]) { - for(u32bit j = 0; j != OUTPUT_LENGTH; ++j) - output[j] = get_byte(7 - (j % 8), digest[j/8]); + for(size_t i = 0; i != OUTPUT_LENGTH; ++i) + output[i] = get_byte(7 - (i % 8), digest[i/8]); } /* @@ -166,7 +166,7 @@ std::string Tiger::name() const /* * Tiger Constructor */ -Tiger::Tiger(u32bit hashlen, u32bit pass) : +Tiger::Tiger(size_t hashlen, size_t pass) : MDx_HashFunction(hashlen, 64, false, false), X(8), digest(3), |