public class SHA1 extends java.lang.Object implements HashFunction<byte[]>
Constructor and Description |
---|
SHA1() |
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) throws HashException
HashFunction
hash
in interface HashFunction<byte[]>
data
- Data to hash against.HashException
public java.math.BigInteger maxValue()
HashFunction
maxValue
in interface HashFunction<byte[]>
public java.math.BigInteger randomHash() throws HashException
HashFunction
randomHash
in interface HashFunction<byte[]>
HashException