MCPcopy Create free account
hub / github.com/d35ha/CallObfuscator / hash_string

Method hash_string

src/shellcode.cpp:58–77  ·  view source on GitHub ↗

Compile time string hashing.

Source from the content-addressed store, hash-verified

56
57// Compile time string hashing.
58DWORD shellcode::hash_string(PCHAR str)
59{
60 // Init value.
61 DWORD hash = 0;
62
63 // Loop on the chars.
64 while (*str)
65 {
66 // Build it.
67 hash += *str++;
68 hash += hash << 10;
69 hash ^= hash >> 6;
70 };
71
72 // Finish.
73 hash += hash << 3;
74 hash ^= hash >> 11;
75 hash += hash << 15;
76 return hash;
77};
78
79// Copy string to a buffer.
80VOID shellcode::str_cpy(PCHAR out, PSTR in)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected