Created
February 7, 2022 20:25
-
-
Save creadone/6748828aa35de0da48206ad5dab1ef06 to your computer and use it in GitHub Desktop.
This file contains 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
unsigned int FNV1aHash (char *buf) | |
{ | |
unsigned int hval = 0x811c9dc5; | |
while (*buf) | |
{ | |
hval ^= (unsigned int)*buf++; | |
hval *= FNV_32_PRIME; | |
} | |
return hval; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment