aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/gost_3411
diff options
context:
space:
mode:
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;
}