Created
November 11, 2021 13:27
-
-
Save HelloKS/91d57daea6bc770ff14a9e844e51b299 to your computer and use it in GitHub Desktop.
Unity engine registry hash generation (windows)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hash_djb2(s): | |
hash = 5381 | |
for x in s: | |
hash = hash * 33 ^ ord(x) | |
return hash & 0xFFFFFFFF | |
print(hash_djb2(u'YourPrefKeyHere')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment