Class MultipleDigestIdentifier

java.lang.Object
eu.europa.esig.dss.model.identifier.Identifier
eu.europa.esig.dss.model.identifier.MultipleDigestIdentifier
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AbstractTLIdentifier, EncapsulatedRevocationTokenIdentifier, TokenIdentifier

public abstract class MultipleDigestIdentifier extends Identifier
This class is used to obtain a requested digest from a stored binary array
See Also:
  • Constructor Details

    • MultipleDigestIdentifier

      protected MultipleDigestIdentifier(String prefix, byte[] binaries)
      Default constructor
      Parameters:
      prefix - String for the identifier
      binaries - token binaries
  • Method Details

    • getBinaries

      public byte[] getBinaries()
      Gets token binaries
      Returns:
      byte array
    • getDigestValue

      public byte[] getDigestValue(DigestAlgorithm digestAlgorithm)
      Returns a digest value for the given digestAlgorithm
      Parameters:
      digestAlgorithm - DigestAlgorithm
      Returns:
      digests
    • isMatch

      public boolean isMatch(Digest expectedDigest)
      Checks if the given digests match to the token
      Parameters:
      expectedDigest - Digest to verify
      Returns:
      TRUE if the digest match, FALSE otherwise