public class TinyHash extends java.lang.Object implements HashFunction<byte[]>
Constructor and Description |
---|
TinyHash(int size) |
Modifier and Type | Method and Description |
---|---|
java.math.BigInteger |
hash(byte[] data)
Maps some given data to an integer location in the implemented hash
space.
|
java.math.BigInteger |
maxValue()
Determines the maximum hash value that this hash function can produce.
|
java.math.BigInteger |
randomHash()
Returns a random location in the hash space.
|
public java.math.BigInteger hash(byte[] data)
HashFunction
hash
in interface HashFunction<byte[]>
data
- Data to hash against.public java.math.BigInteger maxValue()
HashFunction
maxValue
in interface HashFunction<byte[]>
public java.math.BigInteger randomHash()
HashFunction
randomHash
in interface HashFunction<byte[]>