aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/gost_3411
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-13 02:59:43 +0000
committerlloyd <[email protected]>2010-10-13 02:59:43 +0000
commit61ed0d4d90164675396feb7c7cecdd3bc5012f91 (patch)
tree31f48086086c78c6f0ce5fd533d819c8463be822 /src/hash/gost_3411
parent3697dcff8b5e9765b41114281ce10e7ed3d3abb4 (diff)
Remove most uses of HASH_BLOCK_SIZE
Diffstat (limited to 'src/hash/gost_3411')
-rw-r--r--src/hash/gost_3411/gost_3411.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/hash/gost_3411/gost_3411.cpp b/src/hash/gost_3411/gost_3411.cpp
index dbd6335bd..47e073e1f 100644
--- a/src/hash/gost_3411/gost_3411.cpp
+++ b/src/hash/gost_3411/gost_3411.cpp
@@ -46,22 +46,22 @@ void GOST_34_11::add_data(const byte input[], size_t length)
{
buffer.copy(position, input, length);
- if(position + length >= HASH_BLOCK_SIZE)
+ if(position + length >= hash_block_size())
{
compress_n(&buffer[0], 1);
- input += (HASH_BLOCK_SIZE - position);
- length -= (HASH_BLOCK_SIZE - position);
+ input += (hash_block_size() - position);
+ length -= (hash_block_size() - position);
position = 0;
}
}
- const size_t full_blocks = length / HASH_BLOCK_SIZE;
- const size_t remaining = length % HASH_BLOCK_SIZE;
+ const size_t full_blocks = length / hash_block_size();
+ const size_t remaining = length % hash_block_size();
if(full_blocks)
compress_n(input, full_blocks);
- buffer.copy(position, input + full_blocks * HASH_BLOCK_SIZE, remaining);
+ buffer.copy(position, input + full_blocks * hash_block_size(), remaining);
position += remaining;
}