Writes data to an underlying source stream, while hashing the written data.

Synopsis

Declared in <hash.h>

template<typename Source>
class HashedSourceWriter
    : public HashWriter

Base Classes

Name

Description

HashWriter

A writer stream (for serialization) that computes a 256‐bit hash.

Member Functions

Name

Description

HashedSourceWriter [constructor]

Constructs a writer that writes to and hashes an underlying source.

GetCheapHash

Returns the first 64 bits from the resulting hash.

GetHash

Compute the double‐SHA256 hash of all data written to this object.

GetSHA256

Compute the SHA256 hash of all data written to this object.

write

Writes bytes to the source and feeds them into the hash.

operator<<

Serializes an object to the source, hashing the bytes written.

Created with MrDocs