Function in stdx_hashtable.h

x_hashtable_hash_bytes

Hash an arbitrary byte buffer.

X_HASHTABLE_API size_t x_hashtable_hash_bytes(
 const void *ptr,
 size_t size
);

Parameters

const void *ptr
Pointer to the bytes to hash.
size_t size
Number of bytes to hash.

Returns

Hash value for the given byte buffer.

Function in stdx_hashtable.h

x_hashtable_hash_cstr

Hash a NUL-terminated C string (or string-like buffer) for hashtable use.

X_HASHTABLE_API size_t x_hashtable_hash_cstr(
 const void *ptr,
 size_t size
);

Parameters

const void *ptr
Pointer to the string data (typically const char*).
size_t size
Size parameter (typically ignored for C strings, or used as a limit depending on implementation).

Returns

Hash value for the string.