23 #ifndef CRYPTO_KECCAKCORE_H
24 #define CRYPTO_KECCAKCORE_H
42 void update(
const void *data,
size_t size);
43 void pad(uint8_t tag);
45 void extract(
void *data,
size_t size);
46 void encrypt(
void *output,
const void *input,
size_t size);
50 void setHMACKey(
const void *key,
size_t len, uint8_t
pad,
size_t hashSize);
Keccak core sponge function.
size_t blockSize() const
Returns the input block size for the sponge function in bytes.
~KeccakCore()
Destroys this Keccak sponge function after clearing all sensitive information.
void reset()
Resets the Keccak sponge function ready for a new session.
KeccakCore()
Constructs a new Keccak sponge function.
void pad(uint8_t tag)
Pads the last block of input data to blockSize().
size_t capacity() const
Returns the capacity of the sponge function in bits.
void update(const void *data, size_t size)
Updates the Keccak sponge function with more input data.
void extract(void *data, size_t size)
Extracts data from the Keccak sponge function.
void setCapacity(size_t capacity)
Sets the capacity of the Keccak sponge function in bits.
void encrypt(void *output, const void *input, size_t size)
Extracts data from the Keccak sponge function and uses it to encrypt a buffer.
void clear()
Clears all sensitive data from this object.
void setHMACKey(const void *key, size_t len, uint8_t pad, size_t hashSize)
Sets a HMAC key for a Keccak-based hash algorithm.