BloombergLP::bslh::SpookyHashAlgorithmImp::hash128

Compute a 128-bit SpookyHash of message into hash1 and hash2.

Synopsis

Declared in <bslh_spookyhashalgorithmimp.h>

static
void
hash128(
    void const* message,
    size_t length,
    Uint64* hash1,
    Uint64* hash2);

Description

Hash the specified length bytes of message using hash1 and hash2 as seeds. Load the higher order bits of the resulting 128-bit hash value into hash1 and the lower order bits in hash2. The behavior is undefined unless message points at least length bytes of initialized memory or length is zero, and both hash1 and hash2 point to at least 8 bytes of initialized, modifiable, memory.

Parameters

NameDescription
messagebytes to hash
lengthnumber of bytes in message
hash1seed and higher-order 64 bits of the resulting hash
hash2seed and lower-order 64 bits of the resulting hash