26extern void KeccakF1600(
word64 *state);
31 if (length == 0) {
return; }
34 while (length >= (spaceLeft = r() - m_counter))
37 xorbuf(m_state.BytePtr() + m_counter, input, spaceLeft);
45 xorbuf(m_state.BytePtr() + m_counter, input, length);
46 m_counter += (
unsigned int)length;
51 std::memset(m_state, 0, m_state.SizeInBytes());
58 ThrowIfInvalidTruncatedSize(size);
60 m_state.BytePtr()[m_counter] ^= 0x01;
61 m_state.BytePtr()[r()-1] ^= 0x80;
63 std::memcpy(hash, m_state, size);
void TruncatedFinal(byte *hash, size_t size)
Computes the hash of the current message.
void Restart()
Restart the hash.
void Update(const byte *input, size_t length)
Updates a hash with additional input.
unsigned long long word64
64-bit unsigned datatype
Classes for Keccak message digests.
CRYPTOPP_DLL void xorbuf(byte *buf, const byte *mask, size_t count)
Performs an XOR of a buffer with a mask.
Crypto++ library namespace.
#define CRYPTOPP_ASSERT(exp)
Debugging and diagnostic assertion.