Mila
Deep Neural Network Library
Loading...
Searching...
No Matches
Mila::Distribution::Sha256 Class Referenceexport

Incremental SHA-256. More...

Public Member Functions

std::string finish ()
 Finalize and return the digest as lowercase hex.
void update (const void *data, size_t length)

Detailed Description

Incremental SHA-256.

Feed bytes with update(), read the digest with finish().

Incremental by requirement, not convenience: a 6.33 GB artifact is hashed as it arrives from the network so the bytes are touched once. A verification pass over the finished file would double the I/O for no extra confidence.

Member Function Documentation

◆ finish()

std::string Mila::Distribution::Sha256::finish ( )
inline

Finalize and return the digest as lowercase hex.

Consumes the state; a second call returns the digest of the padded stream and is a caller error.


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