Page MenuHomePhorge

utils.c
No OneTemporary

Size
417 B
Referenced Files
None
Subscribers
None
#include "utils.h"
#include <string.h>
#include <stdint.h>
uint64_t hash_key(const char *key, size_t len) {
uint64_t hash = 14695981039346656037ULL;
size_t i = 0;
for (; i + 8 <= len; i += 8) {
uint64_t word;
memcpy(&word, key + i, 8);
hash ^= word;
hash *= 1099511628211ULL;
}
for (; i < len; i++) {
hash ^= (uint8_t)key[i];
hash *= 1099511628211ULL;
}
return hash;
}

File Metadata

Mime Type
text/x-c
Expires
Sun, May 3, 8:15 AM (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
526126
Default Alt Text
utils.c (417 B)

Event Timeline