libusual  0.1
Functions
usual/hashing/memhash.h File Reference

Randomized in-memory hashing. More...

Functions

uint32_t memhash (const void *data, size_t len)
 Hash data.
uint32_t memhash_string (const char *s)
 Hash zero-terminated string.
uint32_t memhash_seed (const void *data, size_t len, uint32_t seed)
 Hash with given seed.

Detailed Description

Randomized in-memory hashing.

Functions here use randomized seed and pick fastest hash for current CPU.


Function Documentation

uint32_t memhash ( const void *  data,
size_t  len 
)

Hash data.

uint32_t memhash_string ( const char *  s)

Hash zero-terminated string.

uint32_t memhash_seed ( const void *  data,
size_t  len,
uint32_t  seed 
)

Hash with given seed.

Result is not randomized, but still may vary on different CPU-s.