summaryrefslogtreecommitdiff
path: root/sha3.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-04-23 17:41:31 -0500
committerJeffrey Walton <noloader@gmail.com>2016-04-23 17:41:31 -0500
commit62a72f9dfa986726d73541b0ee3420e3ebd0dc8b (patch)
treead7748b385df649930c8907159b5adbb38c91acd /sha3.cpp
parent920b23d884e684864ec6b7e79129a59ea9df5442 (diff)
parent844daf0eabdd80f8d0b4de6e099c9423c1509c04 (diff)
downloadcryptopp-git-62a72f9dfa986726d73541b0ee3420e3ebd0dc8b.tar.gz
Merge pull request #41 from kinap/master
Updated SHA3 padding to NIST final FIPS 202 spec.
Diffstat (limited to 'sha3.cpp')
-rw-r--r--sha3.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha3.cpp b/sha3.cpp
index 9ab24ec8..f66ef494 100644
--- a/sha3.cpp
+++ b/sha3.cpp
@@ -280,7 +280,7 @@ void SHA3::Restart()
void SHA3::TruncatedFinal(byte *hash, size_t size)
{
ThrowIfInvalidTruncatedSize(size);
- m_state.BytePtr()[m_counter] ^= 1;
+ m_state.BytePtr()[m_counter] ^= 0x06;
m_state.BytePtr()[r()-1] ^= 0x80;
KeccakF1600(m_state);
memcpy(hash, m_state, size);