 |
Belle II Software
release-05-02-19
|
11 #include <framework/utilities/sha3hash/Hash.h>
12 #include <framework/logging/Logger.h>
15 #include "KeccakHash.h"
55 B2FATAL(
"Unknown mode for SHA3Hash");
71 std::vector<unsigned char> buff(
m_mode);
98 B2FATAL(
"Unknown mode for ShakeHash");
@ c_SHAKE256
variable hash size with up to 256 bit collision resistance
Since we cannot forward declare the memory structure directly due to some typedeffing we inherit from...
void update(int n, unsigned char *buff)
update the internal state by adding n bytes of data from buff
EHashMode
Available hash modes according to FIPS 202 draft.
@ c_SHA3_512
384bit output size
void getHash(int n, unsigned char *buff)
obtain the hash value with a length of n bytes into buff
EHashMode
Available hash modes according to FIPS 202 draft.
~ShakeHash()
destructor freeing the memory
void clear()
reinit the hash structure to create a new hash sum
@ c_SHA3_256
224bit output size
KeccakHashInstance * m_instance
memory structure to calculate the hash value
Abstract base class for different kinds of events.
KeccakHashInstance * m_instance
memory structure to calculate the hash value
EHashMode m_mode
chosen hash mode
ShakeHash(EHashMode mode)
constructor initializing the hash structure
SHA3Hash(EHashMode length)
Constructor initializing the hash structure with a given output size.
@ c_SHA3_384
256bit output size
~SHA3Hash()
destructor freeing the memory
@ c_SHAKE128
variable hash size with up to 128 bit collision resistance
EHashMode m_mode
chosen hash mode
std::vector< unsigned char > getHash()
obtain the hash value as a vector of unsigned char