krati.util
Class FnvHashFunction

java.lang.Object
  extended by 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


Field Summary
 
Fields inherited from interface krati.util.HashFunction
MAX_HASH_CODE, MIN_HASH_CODE, NON_HASH_CODE
 
Constructor Summary
FnvHashFunction()
           
 
Method Summary
 long hash(byte[] buffer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FnvHashFunction

public FnvHashFunction()
Method Detail

hash

public final long hash(byte[] buffer)
Specified by:
hash in interface HashFunction<byte[]>


Copyright © 2011. All Rights Reserved.