Joedb 9.5.0
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
joedb::SHA_256 Class Reference

#include <joedb/journal/SHA_256.h>

Public Types

typedef std::array< uint32_t, 8 > Hash
 

Public Member Functions

 SHA_256 ()
 
const Hashget_hash () const
 
void process_chunk (const char *data)
 process 512 bits (32 * 16, 8 * 64) of data, SHA_256::chunk_size bytes
 
void process_final_chunk (const char *const data, const uint64_t total_length_in_bytes)
 process last bytes of the sequence
 

Static Public Attributes

static constexpr size_t chunk_size = 64
 

Detailed Description

Definition at line 20 of file SHA_256.h.

Member Typedef Documentation

◆ Hash

typedef std::array<uint32_t, 8> joedb::SHA_256::Hash

Definition at line 60 of file SHA_256.h.

Constructor & Destructor Documentation

◆ SHA_256()

joedb::SHA_256::SHA_256 ( )
inline

Definition at line 66 of file SHA_256.h.

Member Function Documentation

◆ get_hash()

const Hash & joedb::SHA_256::get_hash ( ) const
inline

Definition at line 67 of file SHA_256.h.

◆ process_chunk()

void joedb::SHA_256::process_chunk ( const char *  data)
inline

Definition at line 71 of file SHA_256.h.

◆ process_final_chunk()

void joedb::SHA_256::process_final_chunk ( const char *const  data,
const uint64_t  total_length_in_bytes 
)
inline
Parameters
datapoints to the final n bytes, 0 <= n < 64
total_length_in_bytesis the length of the whole sequence

Definition at line 125 of file SHA_256.h.

Member Data Documentation

◆ chunk_size

constexpr size_t joedb::SHA_256::chunk_size = 64
staticconstexpr

Definition at line 68 of file SHA_256.h.


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