diff options
author | lloyd <[email protected]> | 2010-10-29 13:51:27 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-10-29 13:51:27 +0000 |
commit | 633175a57a03ed9bf5a5e3577bfc26068c62b688 (patch) | |
tree | 086eb3a931d39fb35f8a3896a25a5cb38736a696 /src/hash/mdx_hash/mdx_hash.cpp | |
parent | df0dfeb904485bacb8034d0468b4498130939acc (diff) |
Remove BufferedComputation::OUTPUT_LENGTH
Diffstat (limited to 'src/hash/mdx_hash/mdx_hash.cpp')
-rw-r--r-- | src/hash/mdx_hash/mdx_hash.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/hash/mdx_hash/mdx_hash.cpp b/src/hash/mdx_hash/mdx_hash.cpp index f82c971f8..7bfcf6592 100644 --- a/src/hash/mdx_hash/mdx_hash.cpp +++ b/src/hash/mdx_hash/mdx_hash.cpp @@ -14,19 +14,15 @@ namespace Botan { /* * MDx_HashFunction Constructor */ -MDx_HashFunction::MDx_HashFunction(size_t hash_len, - size_t block_len, +MDx_HashFunction::MDx_HashFunction(size_t block_len, bool byte_end, bool bit_end, size_t cnt_size) : - HashFunction(hash_len), buffer(block_len), BIG_BYTE_ENDIAN(byte_end), BIG_BIT_ENDIAN(bit_end), COUNT_SIZE(cnt_size) { - if(COUNT_SIZE >= output_length() || COUNT_SIZE >= hash_block_size()) - throw Invalid_Argument("MDx_HashFunction: COUNT_SIZE is too big"); count = position = 0; } @@ -98,6 +94,8 @@ void MDx_HashFunction::write_count(byte out[]) { if(COUNT_SIZE < 8) throw Invalid_State("MDx_HashFunction::write_count: COUNT_SIZE < 8"); + if(COUNT_SIZE >= output_length() || COUNT_SIZE >= hash_block_size()) + throw Invalid_Argument("MDx_HashFunction: COUNT_SIZE is too big"); const u64bit bit_count = count * 8; |