23NAMESPACE_BEGIN(CryptoPP)
26extern void KeccakF1600(word64 *state);
30NAMESPACE_BEGIN(CryptoPP)
32void
SHA3::Update(const
byte *input,
size_t length)
34 CRYPTOPP_ASSERT(!(input == NULLPTR && length != 0));
35 if (length == 0) {
return; }
38 while (length >= (spaceLeft = r() - m_counter))
41 xorbuf(m_state.BytePtr() + m_counter, input, spaceLeft);
49 xorbuf(m_state.BytePtr() + m_counter, input, length);
50 m_counter += (
unsigned int)length;
61 CRYPTOPP_ASSERT(hash != NULLPTR);
64 m_state.
BytePtr()[m_counter] ^= 0x06;
65 m_state.
BytePtr()[r()-1] ^= 0x80;
67 std::memcpy(hash, m_state, size);
SHA3 message digest base class.
void TruncatedFinal(byte *hash, size_t size)
Computes the hash of the current message.
void Restart()
Restart the hash.
size_type SizeInBytes() const
Provides the number of bytes in the SecBlock.
byte * BytePtr()
Provides a byte pointer to the first element in the memory block.
Classes for SHA3 message digests.