Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public uint GetHashKey(string input)
- {
- if (string.IsNullOrWhiteSpace(input))
- {
- return 0u;
- }
- byte[] bytes = Encoding.UTF8.GetBytes(input.ToLower().ToCharArray());
- uint num = 0u;
- int i = 0;
- int num2 = bytes.Length;
- while (i < num2)
- {
- num += (uint)bytes[i];
- num += num << 10;
- num ^= num >> 6;
- i++;
- }
- num += num << 3;
- num ^= num >> 11;
- return num + (num << 15);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement