[#BloombergLP-bdlb-HashUtil-hash2-024]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/HashUtil.adoc[HashUtil]::hash2
:relfileprefix: ../../../
:mrdocs:

Return a portable 32&hyphen;bit hash value for the specified `key`&period;

== Synopsis

Declared in `&lt;bdlb&lowbar;hashutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
unsigned int
hash2(char key);
----

== Description

Return an unsigned integer hash value corresponding to the specified `key`&period; Note that the return value is seemingly random (i&period;e&period;, the hash is good) but identical on all platforms (irrespective of endianness)&period; Both functions `hash1` and `hash2` return a hash, but both hashes can be assumed to be independent (i&period;e&period;, there are no known correlations between the results of both hash functions given the same input data)&period;

== Return Value

portable 32&hyphen;bit hash value for `key`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *key*
| value to hash
|===


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