Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
util::Sha256sum Class Reference

Streaming SHA-256 hasher for large data sets. More...

#include <Shasum.hpp>

Public Member Functions

void update (void const *data, size_t size)
 Update hash with data.
template<typename T>
void update (T const &value)
 Update hash with a value.
ripple::uint256 finalize () &&
 Finalize hash and return result as ripple::uint256.

Detailed Description

Streaming SHA-256 hasher for large data sets.

This class provides a streaming interface for calculating SHA-256 hashes without requiring all data to be in memory at once.

Member Function Documentation

◆ finalize()

ripple::uint256 util::Sha256sum::finalize ( ) &&

Finalize hash and return result as ripple::uint256.

Returns
The SHA-256 hash.

◆ update() [1/2]

template<typename T>
void util::Sha256sum::update ( T const & value)
inline

Update hash with a value.

Parameters
valueValue to hash.

◆ update() [2/2]

void util::Sha256sum::update ( void const * data,
size_t size )

Update hash with data.

Parameters
dataPointer to data to hash.
sizeSize of data in bytes.

The documentation for this class was generated from the following files:
  • /__w/clio/clio/src/util/Shasum.hpp
  • /__w/clio/clio/src/util/Shasum.cpp