summaryrefslogtreecommitdiff
path: root/sha3.cpp
diff options
context:
space:
mode:
authorDaniel Collins <daniel.e.collins@intel.com>2015-10-15 10:41:31 -0700
committerDaniel Collins <daniel.e.collins@intel.com>2015-10-15 10:41:31 -0700
commit844daf0eabdd80f8d0b4de6e099c9423c1509c04 (patch)
treeae047e752503750e02cef09ef8e84c08ff990c0e /sha3.cpp
parentaff51055698873166c93d83ce09578d2ec613e64 (diff)
downloadcryptopp-git-844daf0eabdd80f8d0b4de6e099c9423c1509c04.tar.gz
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 7db82c19..a96887e9 100644
--- a/sha3.cpp
+++ b/sha3.cpp
@@ -274,7 +274,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);