Class XMLEvidenceRecordDataObjectDigestBuilder
java.lang.Object
eu.europa.esig.dss.evidencerecord.common.digest.AbstractDataObjectDigestBuilder
eu.europa.esig.dss.evidencerecord.xml.digest.XMLEvidenceRecordDataObjectDigestBuilder
- All Implemented Interfaces:
DataObjectDigestBuilder
Generates digests for data objects to be protected by an IETF RFC 6283 XMLERS evidence-record
-
Field Summary
Fields inherited from class eu.europa.esig.dss.evidencerecord.common.digest.AbstractDataObjectDigestBuilder
digestAlgorithm, document, inputStream
-
Constructor Summary
ConstructorDescriptionXMLEvidenceRecordDataObjectDigestBuilder
(byte[] binaries) Constructor to create a builder for computing digest on the given binaries using a SHA-256 digest algorithmXMLEvidenceRecordDataObjectDigestBuilder
(byte[] binaries, DigestAlgorithm digestAlgorithm) Constructor to create a builder for computing digest on the given binaries using a provided digest algorithmConstructor to create a builder for computing digest on the given document using a SHA-256 digest algorithmXMLEvidenceRecordDataObjectDigestBuilder
(DSSDocument document, DigestAlgorithm digestAlgorithm) Constructor to create a builder for computing digest on the given document using a provided digest algorithmXMLEvidenceRecordDataObjectDigestBuilder
(InputStream inputStream) Constructor to create a builder for computing digest on the given InputStream using a SHA-256 digest algorithmXMLEvidenceRecordDataObjectDigestBuilder
(InputStream inputStream, DigestAlgorithm digestAlgorithm) Constructor to create a builder for computing digest on the given InputStream using a provided digest algorithm -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Generates hash valuesetCanonicalizationMethod
(String canonicalizationMethod) Sets a canonicalization method to be used Default: "http://www.w3.org/TR/2001/REC-xml-c14n-20010315" canonicalization algorithm
-
Constructor Details
-
XMLEvidenceRecordDataObjectDigestBuilder
public XMLEvidenceRecordDataObjectDigestBuilder(byte[] binaries) Constructor to create a builder for computing digest on the given binaries using a SHA-256 digest algorithm- Parameters:
binaries
- byte array to compute hash on
-
XMLEvidenceRecordDataObjectDigestBuilder
Constructor to create a builder for computing digest on the given InputStream using a SHA-256 digest algorithm- Parameters:
inputStream
-InputStream
to compute hash on
-
XMLEvidenceRecordDataObjectDigestBuilder
Constructor to create a builder for computing digest on the given document using a SHA-256 digest algorithm- Parameters:
document
-DSSDocument
to compute hash on
-
XMLEvidenceRecordDataObjectDigestBuilder
Constructor to create a builder for computing digest on the given binaries using a provided digest algorithm- Parameters:
binaries
-DigestAlgorithm
to compute hash ondigestAlgorithm
-DigestAlgorithm
to be used on hash computation
-
XMLEvidenceRecordDataObjectDigestBuilder
public XMLEvidenceRecordDataObjectDigestBuilder(InputStream inputStream, DigestAlgorithm digestAlgorithm) Constructor to create a builder for computing digest on the given InputStream using a provided digest algorithm- Parameters:
inputStream
-InputStream
to compute hash ondigestAlgorithm
-DigestAlgorithm
to be used on hash computation
-
XMLEvidenceRecordDataObjectDigestBuilder
public XMLEvidenceRecordDataObjectDigestBuilder(DSSDocument document, DigestAlgorithm digestAlgorithm) Constructor to create a builder for computing digest on the given document using a provided digest algorithm- Parameters:
document
-DSSDocument
to compute hash ondigestAlgorithm
-DigestAlgorithm
to be used on hash computation
-
-
Method Details
-
setCanonicalizationMethod
public XMLEvidenceRecordDataObjectDigestBuilder setCanonicalizationMethod(String canonicalizationMethod) Sets a canonicalization method to be used Default: "http://www.w3.org/TR/2001/REC-xml-c14n-20010315" canonicalization algorithm- Parameters:
canonicalizationMethod
-String
- Returns:
- this
XMLEvidenceRecordDataObjectDigestBuilder
-
build
Description copied from interface:DataObjectDigestBuilder
Generates hash value- Specified by:
build
in interfaceDataObjectDigestBuilder
- Overrides:
build
in classAbstractDataObjectDigestBuilder
- Returns:
Digest
containing the hash value of the data object and the used digest algorithm
-