Bitcoin ABC 0.30.3
P2P Digital Currency
Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes | List of all members
SHA3_256 Class Reference

#include <sha3.h>

Public Member Functions

 SHA3_256 ()
 
SHA3_256Write (Span< const uint8_t > data)
 
SHA3_256Finalize (Span< uint8_t > output)
 
SHA3_256Reset ()
 

Static Public Attributes

static constexpr size_t OUTPUT_SIZE = 32
 

Private Attributes

uint64_t m_state [25] = {0}
 
uint8_t m_buffer [8]
 
unsigned m_bufsize = 0
 
unsigned m_pos = 0
 

Static Private Attributes

static constexpr unsigned RATE_BITS = 1088
 Sponge rate in bits. More...
 
static constexpr unsigned RATE_BUFFERS = RATE_BITS / (8 * sizeof(m_buffer))
 Sponge rate expressed as a multiple of the buffer size. More...
 

Detailed Description

Definition at line 16 of file sha3.h.

Constructor & Destructor Documentation

◆ SHA3_256()

SHA3_256::SHA3_256 ( )
inline

Definition at line 35 of file sha3.h.

Member Function Documentation

◆ Finalize()

SHA3_256 & SHA3_256::Finalize ( Span< uint8_t >  output)

Definition at line 232 of file sha3.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Reset()

SHA3_256 & SHA3_256::Reset ( )

Definition at line 245 of file sha3.cpp.

◆ Write()

SHA3_256 & SHA3_256::Write ( Span< const uint8_t >  data)

Definition at line 202 of file sha3.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_buffer

uint8_t SHA3_256::m_buffer[8]
private

Definition at line 19 of file sha3.h.

◆ m_bufsize

unsigned SHA3_256::m_bufsize = 0
private

Definition at line 20 of file sha3.h.

◆ m_pos

unsigned SHA3_256::m_pos = 0
private

Definition at line 21 of file sha3.h.

◆ m_state

uint64_t SHA3_256::m_state[25] = {0}
private

Definition at line 18 of file sha3.h.

◆ OUTPUT_SIZE

constexpr size_t SHA3_256::OUTPUT_SIZE = 32
staticconstexpr

Definition at line 33 of file sha3.h.

◆ RATE_BITS

constexpr unsigned SHA3_256::RATE_BITS = 1088
staticconstexprprivate

Sponge rate in bits.

Definition at line 24 of file sha3.h.

◆ RATE_BUFFERS

constexpr unsigned SHA3_256::RATE_BUFFERS = RATE_BITS / (8 * sizeof(m_buffer))
staticconstexprprivate

Sponge rate expressed as a multiple of the buffer size.

Definition at line 27 of file sha3.h.


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