The
hash functions returns a hash of the given buffer.
The
hash32_buf() function returns a 32 bit hash of
buf, which is
len bytes long, seeded with an initial hash of
ihash (which is usually
HASH32_BUF_INIT). This function may use a different algorithm to
hash32_str() and
hash32_strn().
The
hash32_str() function returns a 32 bit hash of
buf, which is a
NUL terminated ASCII string, seeded with an initial hash of
ihash (which is usually
HASH32_STR_INIT). This function must use the same algorithm as
hash32_strn(), so that the same data returns the same hash.
The
hash32_strn() function returns a 32 bit hash of
buf, which is a
NUL terminated ASCII string, up to a maximum of
len bytes, seeded with an initial hash of
ihash (which is usually
HASH32_STR_INIT). This function must use the same algorithm as
hash32_str(), so that the same data returns the same hash.
The
ihash parameter is provided to allow for incremental hashing by allowing successive calls to use a previous hash value.