20typedef unsigned __int8 uint8_t;
21typedef unsigned __int64 uint64_t;
53 std::string
operator()(
const void* data,
size_t numBytes);
55 std::string
operator()(
const std::string& text);
58 void add(
const void* data,
size_t numBytes);
68 void processBlock(
const void* data);
73 enum { StateSize = 1600 / (8 * 8),
74 MaxBlockSize = 200 - 2 * (224 / 8) };
77 uint64_t m_hash[StateSize];
85 uint8_t m_buffer[MaxBlockSize];
void add(const void *data, size_t numBytes)
add arbitrary number of bytes
std::string operator()(const void *data, size_t numBytes)
compute hash of a memory block
std::string getHash()
return latest hash as hex characters
Keccak(Bits bits=Keccak256)
same as reset()
Usage: std::string msg = "The quick brown fox jumps over the lazy dog"; std::string key = "key"; std:...