MCPcopy Create free account
hub / github.com/GJDuck/e9patch / hash

Function hash

src/e9patch/e9pe.cpp:142–148  ·  view source on GitHub ↗

* Simple string hash function. */

Source from the content-addressed store, hash-verified

140 * Simple string hash function.
141 */
142static uint64_t hash(const char *s)
143{
144 uint64_t h = 777799777ull;
145 while (*s)
146 h = (3333331ull * h) ^ (0xe9e9ea1bull * (uint64_t)*s++);
147 return h;
148}
149
150/*
151 * Simple random number function.

Callers 1

emitPEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected