Class Identifier
java.lang.Object
eu.europa.esig.dss.model.identifier.Identifier
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CertificateRefIdentifier,DataIdentifier,EntityIdentifier,MultipleDigestIdentifier,RevocationRefIdentifier,SignatureAttributeIdentifier,SignatureIdentifier
This class is used to obtain a unique id for an object
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final DigestAlgorithmThe DigestAlgorithm to use -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIdentifier(String prefix, byte[] data) The constructor to get an identifier computed from a the binaries with a defined prefixprotectedIdentifier(String prefix, Digest digest) The constructor to get an identifier computed provided digest with a defined prefix -
Method Summary
Modifier and TypeMethodDescriptionasXmlId()Return an ID conformant to XML Idbooleanprotected MessageDigestgetMessageDigest(DigestAlgorithm digestAlgorithm) GetsMessageDigestof the DigestAlgorithminthashCode()toString()
-
Field Details
-
DIGEST_ALGO
The DigestAlgorithm to use
-
-
Constructor Details
-
Identifier
The constructor to get an identifier computed from a the binaries with a defined prefix- Parameters:
prefix-Stringto be added in the beginning of a String identifierdata- a byte array to compute the identifier from
-
Identifier
The constructor to get an identifier computed provided digest with a defined prefix
-
-
Method Details
-
getMessageDigest
GetsMessageDigestof the DigestAlgorithm- Parameters:
digestAlgorithm-DigestAlgorithm- Returns:
MessageDigest
-
asXmlId
Return an ID conformant to XML Id- Returns:
- the XML encoded ID
-
toString
-
hashCode
public int hashCode() -
equals
-