[#HashWriter]
= HashWriter
:mrdocs:

A writer stream (for serialization) that computes a 256&hyphen;bit hash&period;

== Synopsis

Declared in `&lt;hash&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class HashWriter;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:HashWriter/GetCheapHash.adoc[`GetCheapHash`] 
| Returns the first 64 bits from the resulting hash&period;
| xref:HashWriter/GetHash.adoc[`GetHash`] 
| Compute the double&hyphen;SHA256 hash of all data written to this object&period;
| xref:HashWriter/GetSHA256.adoc[`GetSHA256`] 
| Compute the SHA256 hash of all data written to this object&period;
| xref:HashWriter/write.adoc[`write`] 
| Adds data to the running hash&period;
| xref:HashWriter/operator_lshift.adoc[`operator&lt;&lt;`] 
| Serializes an object into the running hash&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:TaggedHash.adoc[`TaggedHash`]
| Return a HashWriter primed for tagged hashes (as specified in BIP 340)&period;
|===

== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:HashVerifier.adoc[`HashVerifier`] 
| Reads data from an underlying stream, while hashing the read data&period;
| xref:HashedSourceWriter.adoc[`HashedSourceWriter`] 
| Writes data to an underlying source stream, while hashing the written data&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
