diff options
Diffstat (limited to 'src/lib/hash/mdx_hash')
-rw-r--r-- | src/lib/hash/mdx_hash/mdx_hash.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/hash/mdx_hash/mdx_hash.cpp b/src/lib/hash/mdx_hash/mdx_hash.cpp index 8c668874a..7d163dbfb 100644 --- a/src/lib/hash/mdx_hash/mdx_hash.cpp +++ b/src/lib/hash/mdx_hash/mdx_hash.cpp @@ -71,9 +71,8 @@ void MDx_HashFunction::add_data(const uint8_t input[], size_t length) */ void MDx_HashFunction::final_result(uint8_t output[]) { + clear_mem(&m_buffer[m_position], m_buffer.size() - m_position); m_buffer[m_position] = (BIG_BIT_ENDIAN ? 0x80 : 0x01); - for(size_t i = m_position+1; i != m_buffer.size(); ++i) - m_buffer[i] = 0; if(m_position >= m_buffer.size() - COUNT_SIZE) { |