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
// FNV-1a (64-bit) non-cryptographic hash function. | |
// Adapted from: http://github.com/jakedouglas/fnv-java | |
public ulong HashFNV1a(byte[] bytes) | |
{ | |
const ulong fnv64Offset = 14695981039346656037; | |
const ulong fnv64Prime = 0x100000001b3; | |
ulong hash = fnv64Offset; | |
for (var i = 0; i < bytes.Length; i++) | |
{ |