Belle II Software  release-08-01-10
ShakeHash Class Reference

Simple interface to calculate SHAKE256 hash sum (FIPS 202 draft) with variable size from given data inputs. More...

#include <Hash.h>

Collaboration diagram for ShakeHash:

Public Types

enum  EHashMode {
  c_SHAKE128 ,
  c_SHAKE256
}
 Available hash modes according to FIPS 202 draft. More...
 

Public Member Functions

 ShakeHash (EHashMode mode)
 constructor initializing the hash structure
 
 ShakeHash (const ShakeHash &)=delete
 No copying.
 
 ~ShakeHash ()
 destructor freeing the memory
 
void clear ()
 reinit the hash structure to create a new hash sum
 
void update (int n, unsigned char *buff)
 update the internal state by adding n bytes of data from buff
 
void getHash (int n, unsigned char *buff)
 obtain the hash value with a length of n bytes into buff
 

Private Attributes

KeccakHashInstancem_instance
 memory structure to calculate the hash value
 
EHashMode m_mode
 chosen hash mode
 

Detailed Description

Simple interface to calculate SHAKE256 hash sum (FIPS 202 draft) with variable size from given data inputs.

Definition at line 58 of file Hash.h.

Member Enumeration Documentation

◆ EHashMode

enum EHashMode

Available hash modes according to FIPS 202 draft.

Enumerator
c_SHAKE128 

variable hash size with up to 128 bit collision resistance

c_SHAKE256 

variable hash size with up to 256 bit collision resistance

Definition at line 61 of file Hash.h.


The documentation for this class was generated from the following files: