[#BloombergLP-bslh-DefaultSeededHashAlgorithm]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslh.adoc[bslh]::DefaultSeededHashAlgorithm
:relfileprefix: ../../
:mrdocs:

This class wraps an unspecified default hashing algorithm, which takes a seed, that is appropriate for general purpose use such as generating hashes for a hash table&period;

== Synopsis

Declared in `&lt;bslh&lowbar;defaultseededhashalgorithm&period;h&gt;`

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

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslh/DefaultSeededHashAlgorithm/result_type.adoc[`result&lowbar;type`] 
| Typedef indicating the value type returned by this algorithm&period;
|===


== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslh/DefaultSeededHashAlgorithm/_04enum.adoc[`Unnamed enum`] 
| Compile&hyphen;time constants for this seeded hash algorithm&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslh/DefaultSeededHashAlgorithm/2constructor.adoc[`DefaultSeededHashAlgorithm`]         [.small]#[constructor]#
| Create a `bslh&colon;&colon;DefaultSeededHashAlgorithm`, seeded with the (`k&lowbar;SEED&lowbar;LENGTH` bytes) seed pointed to by the specified `seed`&period; Each bit of the supplied seed will contribute to the final hash produced by `computeHash()`&period; The behaviour is undefined unless `seed` points to at least `k&lowbar;SEED&lowbar;LENGTH` bytes of initialized memory&period;
| xref:BloombergLP/bslh/DefaultSeededHashAlgorithm/computeHash.adoc[`computeHash`] 
| Return the finalized version of the hash that has been accumulated&period; Note that this changes the internal state of the object, so calling `computeHash()` multiple times in a row will return different results, and only the first result returned will match the expected result of the algorithm&period; Also note that a value will be returned, even if data has not been passed into `operator()`&period;
| xref:BloombergLP/bslh/DefaultSeededHashAlgorithm/operator_call.adoc[`operator()`] 
| Incorporate the specified `data`, of at least the specified `numBytes`, into the internal state of the hashing algorithm&period; Every bit of data incorporated into the internal state of the algorithm will contribute to the final hash produced by `computeHash()`&period; The same hash will be produced regardless of whether a sequence of bytes is passed in all at once or through multiple calls to this member function&period; Input where `numBytes` is 0 will have no effect on the internal state of the algorithm&period; The behaviour is undefined unless `data` points to a valid memory location with at least `numBytes` bytes of initialized memory or `numBytes` is zero&period;
|===



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