Bitcoin Core 28.99.0
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 ()=default
 
SHA3_256Write (Span< const unsigned char > data)
 
SHA3_256Finalize (Span< unsigned char > output)
 
SHA3_256Reset ()
 

Static Public Attributes

static constexpr size_t OUTPUT_SIZE = 32
 

Private Attributes

uint64_t m_state [25] = {0}
 
unsigned char 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 ( )
default

Member Function Documentation

◆ Finalize()

SHA3_256 & SHA3_256::Finalize ( Span< unsigned char >  output)

Definition at line 136 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 150 of file sha3.cpp.

Here is the caller graph for this function:

◆ Write()

SHA3_256 & SHA3_256::Write ( Span< const unsigned char >  data)

Definition at line 106 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

unsigned char SHA3_256::m_buffer[8]
private

Definition at line 20 of file sha3.h.

◆ m_bufsize

unsigned SHA3_256::m_bufsize = 0
private

Definition at line 21 of file sha3.h.

◆ m_pos

unsigned SHA3_256::m_pos = 0
private

Definition at line 22 of file sha3.h.

◆ m_state

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

Definition at line 19 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 25 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 28 of file sha3.h.


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