BloombergLP::bdlb::HashUtil::hash1

hash1 overloads

Synopses

Declared in <bdlb_hashutil.h>

Same as the preceding overload for the specified key type.

static
unsigned int
hash1(bsls::Types::Int64 key);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash1(bsls::Types::Uint64 key);
» more...

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

static
unsigned int
hash1(char key);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash1(double key);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash1(float key);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash1(int key);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash1(long key);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash1(short key);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash1(signed char key);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash1(unsigned char key);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash1(unsigned int key);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash1(unsigned long key);
» more...

Same as the preceding overload for the specified key type.

static
unsigned int
hash1(unsigned short key);
» more...

Same as the preceding overload for the specified pointer key.

static
unsigned int
hash1(void const* key);
» more...

Return an unsigned integer hash value corresponding to the specified data of the specified length (in bytes). The behavior is undefined unless 0 <= length. Note that if data is 0, then length also must be 0. Also note that every byte in data is significant; that is, it is not appropriate to cast a struct address to a char * unless the struct is packed (no padding).

static
unsigned int
hash1(
    char const* data,
    int length);
» more...