Class Digest

java.lang.Object
eu.europa.esig.dss.model.Digest
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DSSMessageDigest

public class Digest extends Object implements Serializable
Container for a Digest and his algorithm
See Also:
  • Constructor Details

    • Digest

      public Digest()
      Empty constructor
    • Digest

      public Digest(DigestAlgorithm algorithm, byte[] value)
      Default constructor
      Parameters:
      algorithm - DigestAlgorithm used algorithm
      value - byte array digest
  • Method Details

    • getHexValue

      public String getHexValue()
      Gets the HEX (base16) encoded digest value String
      Returns:
      String HEX-encoded digest
    • getAlgorithm

      public DigestAlgorithm getAlgorithm()
      Gets the DigestAlgorithm
      Returns:
      the algorithm
    • setAlgorithm

      public void setAlgorithm(DigestAlgorithm algorithm)
      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()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object