krati.util
Class FnvHashFunction
java.lang.Object
krati.util.FnvHashFunction
- All Implemented Interfaces:
- HashFunction<byte[]>
public final class FnvHashFunction
- extends Object
- implements HashFunction<byte[]>
Taken from http://www.isthe.com/chongo/tech/comp/fnv and Voldemort (voldemort.utils.FnvHashFunction)
hash = basis for each octet_of_data to be hashed hash = hash * FNV_prime hash
= hash xor octet_of_data return hash
Method Summary |
long |
hash(byte[] buffer)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FnvHashFunction
public FnvHashFunction()
hash
public final long hash(byte[] buffer)
- Specified by:
hash
in interface HashFunction<byte[]>
Copyright © 2011. All Rights Reserved.