#include "str.h" uint64_t fnv1a64(uint8_t* buf, size_t size) { size_t i; uint64_t hash = 0xcbf29ce484222325; for (i = 0; i < size; i++, buf++) { hash ^= *buf; hash *= 0x100000001b3; } return hash; }