Reads data from an underlying stream, while hashing the read data.

Synopsis

Declared in <hash.h>

template<typename Source>
class HashVerifier
    : public HashWriter

Base Classes

Name

Description

HashWriter

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

Member Functions

Name

Description

HashVerifier [constructor]

Constructs a verifier that reads from 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.

ignore

Reads and hashes the given number of bytes without storing them.

operator>>

Deserializes an object from the source, hashing the bytes read.

read

Reads bytes from the source and feeds them into the hash.

write

Adds data to the running hash.

operator<<

Serializes an object into the running hash.

Created with MrDocs