19 return (x << n) | (x >> (64 - n));
25 0x0000000000000001, 0x0000000000008082, 0x800000000000808a,
26 0x8000000080008000, 0x000000000000808b, 0x0000000080000001,
27 0x8000000080008081, 0x8000000000008009, 0x000000000000008a,
28 0x0000000000000088, 0x0000000080008009, 0x000000008000000a,
29 0x000000008000808b, 0x800000000000008b, 0x8000000000008089,
30 0x8000000000008003, 0x8000000000008002, 0x8000000000000080,
31 0x000000000000800a, 0x800000008000000a, 0x8000000080008081,
32 0x8000000000008080, 0x0000000080000001, 0x8000000080008008};
33 static constexpr int ROUNDS = 24;
35 for (
int round = 0; round <
ROUNDS; ++round) {
239 for (
unsigned i = 0; i < 4; ++i) {
SHA3_256 & Finalize(Span< uint8_t > output)
static constexpr unsigned RATE_BUFFERS
Sponge rate expressed as a multiple of the buffer size.
SHA3_256 & Write(Span< const uint8_t > data)
static constexpr size_t OUTPUT_SIZE
A Span is an object that can refer to a contiguous sequence of objects.
constexpr std::size_t size() const noexcept
CONSTEXPR_IF_NOT_DEBUG Span< C > subspan(std::size_t offset) const noexcept
constexpr C * data() const noexcept
constexpr C * begin() const noexcept
constexpr C * end() const noexcept
static uint64_t ReadLE64(const uint8_t *ptr)
static void WriteLE64(uint8_t *ptr, uint64_t x)
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
void KeccakF(uint64_t(&st)[25])
The Keccak-f[1600] transform.
void KeccakF(uint64_t(&st)[25])
The Keccak-f[1600] transform.