CC
Size: a a a
CC
CC
CC
CC
RX
CC
CC
CC
CC
CC
CC
CC
CC
CC
A
🦊
#include <stdint.h>
uint64_t hash_c_string(const char* in, uint64_t seed) {
while (*in++ != 0) {
seed ^= *in + 0x9e3779b9 + (seed << 6) + (seed >> 2);
}
return seed;
}
CC
🦊
🦊
uint32_t cstr_hash32(const char* in, uint32_t seed) {
do {
seed ^= *in + 0x9e3779b9 + (seed << 6) + (seed >> 2);
} while (*in++ != 0);
return seed;
}
uint64_t cstr_hash64(const char* in, uint64_t seed) {
do {
seed ^= *in + 0x9e3779b97f4a7800 + (seed << 12) + (seed >> 4);
} while (*in++ != 0);
return seed;
}
CC