MCPcopy Create free account
hub / github.com/KasperskyLab/hrtng / Custom_HashFunction

Function Custom_HashFunction

src/apihashes.cpp:35–48  ·  view source on GitHub ↗

------------------------------------------------------------ 5f087e34ab6a470b9e46bcb7c6edfcc5

Source from the content-addressed store, hash-verified

33//------------------------------------------------------------
34// 5f087e34ab6a470b9e46bcb7c6edfcc5
35static hash_t Custom_HashFunction(const char* libraryName, const char* name, int64 basis, int64 prime)
36{
37 uint32 h = (uint32)basis;
38 uint8 c;
39 while ((c = *name++) != 0) {
40 h ^= c;
41 h *= (uint32)prime;
42 h ^= h >> 16;
43 h *= (uint32)prime;
44 h ^= h >> 16;
45 h *= (uint32)prime;
46 }
47 return HASH32to64(h);
48}
49//------------------------------------------------------------
50static hash_t Ror_HashFunction(const char* libraryName, const char* functionName, int64 basis, int64 prime)
51{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected