public class HashIntoZn extends java.lang.Object implements HashIntoStructure
Zn.| Modifier and Type | Field and Description |
|---|---|
protected HashFunction |
hashIntoZn
The hash function.
|
protected Zn |
structure
The hash target structure.
|
| Constructor and Description |
|---|
HashIntoZn(java.math.BigInteger n) |
HashIntoZn(HashFunction hashFunction,
java.math.BigInteger n) |
HashIntoZn(HashFunction hashFunction,
Zn zn) |
HashIntoZn(Representation repr)
Reconstructs the hash function from its representation.
|
HashIntoZn(Zn zn) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
Representation |
getRepresentation()
The representation of this object.
|
Zn |
getTargetStructure()
Returns the ring Zn that this function hashes to.
|
Zn.ZnElement |
hash(byte[] x)
Hashes a byte array into the structure.
|
Zn.ZnElement |
hash(java.lang.String x)
Hashes a
String (UTF-8 encoded) into the structure. |
int |
hashCode() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waithashprotected HashFunction hashIntoZn
protected Zn structure
public HashIntoZn(HashFunction hashFunction, Zn zn)
public HashIntoZn(HashFunction hashFunction, java.math.BigInteger n)
public HashIntoZn(java.math.BigInteger n)
public HashIntoZn(Zn zn)
public HashIntoZn(Representation repr)
public Representation getRepresentation()
RepresentableReprUtilgetRepresentation in interface RepresentableRepresentationpublic Zn.ZnElement hash(byte[] x)
HashIntoStructurehash in interface HashIntoStructurex - a sequence of bytes to hashpublic Zn.ZnElement hash(java.lang.String x)
HashIntoStructureString (UTF-8 encoded) into the structure.hash in interface HashIntoStructurex - a Stringpublic Zn getTargetStructure()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object