mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 09:59:42 +00:00
Updated SHA3 padding to NIST final FIPS 202 spec
This commit is contained in:
parent
aff5105569
commit
844daf0eab
2
sha3.cpp
2
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);
|
||||
|
Loading…
Reference in New Issue
Block a user