|
CoreComponents 3.0.0
A Modern C++ Toolkit
|
Keccak sponge function More...
#include <cc/Keccak>
Public Member Functions | |
| Keccak () | |
| Create new instance. | |
| Keccak (const Bytes &key) | |
| Create new instance. | |
| bool | absorb (Source source) |
| Absorb a chunk of input data (FeedRate bytes at a time) | |
| void | squeeze (Sink sink) |
| Generate output bytes out of the sponge (FeedRate bytes at a time) | |
Static Public Attributes | |
| static constexpr int | FeedRate = (1600 - Capacity) / 8 |
| Rate of the sponge function (in bytes) | |
Keccak sponge function
| Capacity | Capacity of the sponge function |
| Padding | Additional padding sequence to apply |
| Source | Policy of reading input bytes and automatically applying padding bytes |
The Keccak template class implements the Keccak[c] sponge function according to NIST.FIPS.202, chapter 5.2.
Create new instance.
| key | Initial state bytes |
| bool absorb | ( | Source | source | ) |
Absorb a chunk of input data (FeedRate bytes at a time)
| source | Source to read a single chunk of data from |
| void squeeze | ( | Sink | sink | ) |
Generate output bytes out of the sponge (FeedRate bytes at a time)
| sink | Sink to write output bytes to |
|
staticconstexpr |
Rate of the sponge function (in bytes)