Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //faster than GET_HASH_KEY, external jenkins algorithm
- //credz go to gta5-86442 for his tool source find it at https://www.gta5-mods.com/tools/gta-v-native-hash-tool
- #include <string>
- #include <algorithm>
- #include <iostream>
- using namespace std;
- static Hash CreateHash(string Native)
- {
- string lowerNative = Native;
- transform(lowerNative.begin(), lowerNative.end(), lowerNative.begin(), ::tolower);
- Hash num = 0;
- const char* bytes = lowerNative.c_str();;
- int length = strlen(bytes);
- for (int i = 0; i < length; i++)
- {
- num += bytes[i];
- num += num << 10;
- num ^= num >> 6;
- }
- num += num << 3;
- num ^= num >> 11;
- return (num + (num << 15));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement