iota.lib.cpp
IOTA C++ Library
|
#include <keccak384.hpp>
Public Member Functions | |
void | reset () |
void | absorb (const uint8_t *bytes, size_t size=hashBitLength/8) |
void | squeeze (uint8_t *bytes) |
Static Public Attributes | |
static constexpr unsigned int | rate = 832 |
static constexpr unsigned int | capacity = 768 |
static constexpr unsigned int | hashBitLength = 384 |
static constexpr unsigned int | delimitedSuffix = 0x01 |
Protected Member Functions | |
virtual bool | hashUpdate (const uint8_t *bytes, size_t size) |
virtual bool | hashSqueeze (uint8_t *bytes) |
virtual bool | hashInitialize (void) |
Keccak sponge construction with a 384 bits output.
void IOTA::Crypto::Keccak384::absorb | ( | const uint8_t * | bytes, |
size_t | size = hashBitLength/8 |
||
) |
Absorb the given bytes into the internal state of the sponge.
bytes | The bytes. |
size | The number of bytes. |
|
protectedvirtual |
Keccak_HashInitialize wrapper to allow mock testing.
|
protectedvirtual |
Keccak_HashSqueeze wrapper to allow mock testing.
bytes | Bytes where to squeeze out the internal state of the sponge. |
|
protectedvirtual |
Keccak_HashUpdate wrapper to allow mock testing.
bytes | Bytes to be absorbed into the internal state of the sponge. |
void IOTA::Crypto::Keccak384::reset | ( | ) |
Reset internal state of the sponge.
void IOTA::Crypto::Keccak384::squeeze | ( | uint8_t * | bytes | ) |
Squeeze out bytes from the internal state of the sponge into the given bytes.
bytes | The bytes. |
|
static |
The value of the capacity c (size of the part that is untouched by input/output).
|
static |
Bits that will be automatically appended to the end of the input message, as in domain separation.
|
static |
The desired number of output bits.
|
static |
The value of the rate r (size of the part of the state that is written and read).