xxHash-64, based on Yann Collet's descriptions
How to use:
ulong myseed = 0; XXHash64 myhash(myseed); myhash.put(pointerToSomeBytes, numberOfBytes); myhash.put(pointerToSomeMoreBytes, numberOfMoreBytes); // call put() as often as you like to ...
and compute hash:
ulong result = myhash.hash();
or all of the above in one single line:
ulong result2 = XXHash64::hashOf(mypointer, numBytes, myseed);
Constructs XXHash64 with seed.
Use this to feed the hash with data.
(Re)initialize.
http://cyan4973.github.io/xxHash/
http://create.stephan-brumme.com/xxhash/
TODO make endian-aware
See Implementation
xxHash-64, based on Yann Collet's descriptions
How to use:
ulong myseed = 0; XXHash64 myhash(myseed); myhash.put(pointerToSomeBytes, numberOfBytes); myhash.put(pointerToSomeMoreBytes, numberOfMoreBytes); // call put() as often as you like to ...
and compute hash:
ulong result = myhash.hash();
or all of the above in one single line:
ulong result2 = XXHash64::hashOf(mypointer, numBytes, myseed);