Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int hashingMagic(const char *desc) {
- size_t keyLen = strlen(desc);
- char ch = *desc;
- char ch2, ch3;
- if (*desc) {
- ch2 = *(char *)(desc + 1);
- uint64_t hashed = 0x1505;
- do {
- hashed = 33 * hashed + ch;
- ch3 = *ch2++;
- ch = ch3;
- }
- while (ch3);
- }
- else hashed = 0x1505;
- return (int)hashed;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement