|
iota.lib.cpp
IOTA C++ Library
|
#include <kerl.hpp>
Public Member Functions | |
| void | reset () |
| void | absorb (const std::vector< uint8_t > &bytes, std::size_t offset=0, std::size_t length=0) |
| void | squeeze (std::vector< uint8_t > &bytes, std::size_t offset=0) |
| void | finalSqueeze (std::vector< uint8_t > &bytes, std::size_t offset=0) |
Hashing algorithm, based on keccak. Trits are absorbed by the sponge function and later squeezed to provide message digest, derive keys etc.
| void IOTA::Crypto::Kerl::absorb | ( | const std::vector< uint8_t > & | bytes, |
| std::size_t | offset = 0, |
||
| std::size_t | length = 0 |
||
| ) |
Absorb the input bytes into the current state of the sponge.
| bytes | Input bytes to be absorbed on current state of the sponge. |
| offset | Offset at which the current state of the sponge should be modified. |
| length | Length of the given input that should be used for absorption. |
| void IOTA::Crypto::Kerl::finalSqueeze | ( | std::vector< uint8_t > & | bytes, |
| std::size_t | offset = 0 |
||
| ) |
Squeeze the final current state of the sponge to the given trits. Kerl should not be used after this function is called, unless it is reset.
| bytes | Bytes to be squeezed based on current state of the sponge. |
| offset | Offset at which the bytes should be modified. |
| void IOTA::Crypto::Kerl::reset | ( | ) |
Reset current state of the sponge.
| void IOTA::Crypto::Kerl::squeeze | ( | std::vector< uint8_t > & | bytes, |
| std::size_t | offset = 0 |
||
| ) |
Squeeze the current state of the sponge to the given trits.
| bytes | Bytes to be squeezed based on current state of the sponge. |
| offset | Offset at which the bytes should be modified. |
1.8.14