Skip to content

Instantly share code, notes, and snippets.

@thushan
Created January 22, 2015 06:24
Show Gist options
  • Select an option

  • Save thushan/e0afaf3f535d425ee3ed to your computer and use it in GitHub Desktop.

Select an option

Save thushan/e0afaf3f535d425ee3ed to your computer and use it in GitHub Desktop.
int jhash(string value)
{
int h = 8388617;
char[] values = value.ToCharArray();
for(int i = 0; i< value.Length; i++)
h = ( (h << 1 | h >> 30) & 0x7fffffff ) ^ values[i];
return h;
}
@thushan

thushan commented Jan 23, 2015

Copy link
Copy Markdown
Author

Love your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment