Package eu.europa.esig.dss.model
Class Digest
java.lang.Object
eu.europa.esig.dss.model.Digest
- All Implemented Interfaces:
Serializable
public final class Digest extends Object implements Serializable
Container for a Digest and his algorithm
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description Digest()
Empty constructorDigest(DigestAlgorithm algorithm, byte[] value)
Default constructor -
Method Summary
Modifier and Type Method Description boolean
equals(Object obj)
DigestAlgorithm
getAlgorithm()
Gets the DigestAlgorithmString
getHexValue()
Gets the HEX (base16) encoded digest value Stringbyte[]
getValue()
Gets the digest valueint
hashCode()
void
setAlgorithm(DigestAlgorithm algorithm)
Sets the DigestAlgorithmvoid
setValue(byte[] value)
Sets the digest valueString
toString()
-
Constructor Details
-
Digest
public Digest()Empty constructor -
Digest
Default constructor- Parameters:
algorithm
-DigestAlgorithm
used algorithmvalue
- byte array digest
-
-
Method Details
-
getHexValue
Gets the HEX (base16) encoded digest value String- Returns:
String
HEX-encoded digest
-
getAlgorithm
Gets the DigestAlgorithm- Returns:
- the algorithm
-
setAlgorithm
Sets the DigestAlgorithm- Parameters:
algorithm
- the algorithm to set
-
getValue
public byte[] getValue()Gets the digest value- Returns:
- the value
-
setValue
public void setValue(byte[] value)Sets the digest value- Parameters:
value
- the value to set
-
hashCode
public int hashCode() -
equals
-
toString
-