26extern void KeccakF1600(
word64 *state);
31 if (length == 0) {
return; }
34 while (length >= (spaceLeft = r() - m_counter))
46 m_counter += (
unsigned int)length;
55void SHAKE::ThrowIfInvalidTruncatedSize(
size_t size)
const
58 throw InvalidArgument(std::string(
"HashTransformation: can't truncate a ") +
65 ThrowIfInvalidTruncatedSize(size);
67 m_state.
BytePtr()[m_counter] ^= 0x1F;
68 m_state.
BytePtr()[r()-1] ^= 0x80;
76 std::memcpy(hash, m_state, segmentLen);
An invalid argument was detected.
void Restart()
Restart the hash.
void TruncatedFinal(byte *hash, size_t size)
Computes the hash of the current message.
void Update(const byte *input, size_t length)
Updates a hash with additional input.
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.
unsigned long long word64
64-bit unsigned datatype
const T & STDMIN(const T &a, const T &b)
Replacement function for std::min.
std::string IntToString(T value, unsigned int base=10)
Converts a value to a string.
CRYPTOPP_DLL void xorbuf(byte *buf, const byte *mask, size_t count)
Performs an XOR of a buffer with a mask.
Crypto++ library namespace.
Classes for SHAKE message digests.
#define CRYPTOPP_ASSERT(exp)
Debugging and diagnostic assertion.