Lightweight 0.20251202.0
Loading...
Searching...
No Matches
Lightweight::SqlBackup::Sha256 Class Reference

Simple SHA-256 implementation for backup integrity verification. More...

#include <Sha256.hpp>

Public Member Functions

void Reset ()
 
void Update (void const *data, size_t len)
 
void Update (std::span< uint8_t const > data)
 
void Update (std::string_view data)
 
std::array< uint8_t, DigestSize > Finalize ()
 

Static Public Member Functions

static std::string ToHex (std::array< uint8_t, DigestSize > const &digest)
 
static std::string Hash (void const *data, size_t len)
 
static std::string Hash (std::string_view data)
 

Static Public Attributes

static constexpr size_t DigestSize = 32
 
static constexpr size_t BlockSize = 64
 

Detailed Description

Simple SHA-256 implementation for backup integrity verification.

Definition at line 17 of file Sha256.hpp.

Constructor & Destructor Documentation

◆ Sha256()

Lightweight::SqlBackup::Sha256::Sha256 ( )
inline

Definition at line 23 of file Sha256.hpp.

Member Function Documentation

◆ Reset()

void Lightweight::SqlBackup::Sha256::Reset ( )
inline

Definition at line 28 of file Sha256.hpp.

◆ Update() [1/3]

void Lightweight::SqlBackup::Sha256::Update ( void const *  data,
size_t  len 
)
inline

Definition at line 42 of file Sha256.hpp.

◆ Update() [2/3]

void Lightweight::SqlBackup::Sha256::Update ( std::span< uint8_t const >  data)
inline

Definition at line 76 of file Sha256.hpp.

◆ Update() [3/3]

void Lightweight::SqlBackup::Sha256::Update ( std::string_view  data)
inline

Definition at line 81 of file Sha256.hpp.

◆ Finalize()

std::array< uint8_t, DigestSize > Lightweight::SqlBackup::Sha256::Finalize ( )
inline

Definition at line 86 of file Sha256.hpp.

◆ ToHex()

static std::string Lightweight::SqlBackup::Sha256::ToHex ( std::array< uint8_t, DigestSize > const &  digest)
inlinestatic

Definition at line 118 of file Sha256.hpp.

◆ Hash() [1/2]

static std::string Lightweight::SqlBackup::Sha256::Hash ( void const *  data,
size_t  len 
)
inlinestatic

Definition at line 126 of file Sha256.hpp.

◆ Hash() [2/2]

static std::string Lightweight::SqlBackup::Sha256::Hash ( std::string_view  data)
inlinestatic

Definition at line 133 of file Sha256.hpp.

Member Data Documentation

◆ DigestSize

constexpr size_t Lightweight::SqlBackup::Sha256::DigestSize = 32
staticconstexpr

Definition at line 20 of file Sha256.hpp.

◆ BlockSize

constexpr size_t Lightweight::SqlBackup::Sha256::BlockSize = 64
staticconstexpr

Definition at line 21 of file Sha256.hpp.


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