Bitcoin Core  27.99.0
P2P Digital Currency
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
CSHA256 Class Reference

A hasher class for SHA-256. More...

#include <sha256.h>

Public Member Functions

 CSHA256 ()
 
CSHA256Write (const unsigned char *data, size_t len)
 
void Finalize (unsigned char hash[OUTPUT_SIZE])
 
CSHA256Reset ()
 

Static Public Attributes

static const size_t OUTPUT_SIZE = 32
 

Private Attributes

uint32_t s [8]
 
unsigned char buf [64]
 
uint64_t bytes {0}
 

Detailed Description

A hasher class for SHA-256.

Definition at line 13 of file sha256.h.

Constructor & Destructor Documentation

◆ CSHA256()

CSHA256::CSHA256 ( )

Definition at line 697 of file sha256.cpp.

Member Function Documentation

◆ Finalize()

void CSHA256::Finalize ( unsigned char  hash[OUTPUT_SIZE])

Definition at line 728 of file sha256.cpp.

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

◆ Reset()

CSHA256 & CSHA256::Reset ( )

Definition at line 745 of file sha256.cpp.

Here is the caller graph for this function:

◆ Write()

CSHA256 & CSHA256::Write ( const unsigned char *  data,
size_t  len 
)

Definition at line 702 of file sha256.cpp.

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

Member Data Documentation

◆ buf

unsigned char CSHA256::buf[64]
private

Definition at line 17 of file sha256.h.

◆ bytes

uint64_t CSHA256::bytes {0}
private

Definition at line 18 of file sha256.h.

◆ OUTPUT_SIZE

const size_t CSHA256::OUTPUT_SIZE = 32
static

Definition at line 21 of file sha256.h.

◆ s

uint32_t CSHA256::s[8]
private

Definition at line 16 of file sha256.h.


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