Class XMLEvidenceRecordRenewalDigestBuilder
java.lang.Object
eu.europa.esig.dss.evidencerecord.common.digest.AbstractEvidenceRecordRenewalDigestBuilder
eu.europa.esig.dss.evidencerecord.xml.digest.XMLEvidenceRecordRenewalDigestBuilder
- All Implemented Interfaces:
EvidenceRecordRenewalDigestBuilder
public class XMLEvidenceRecordRenewalDigestBuilder
extends AbstractEvidenceRecordRenewalDigestBuilder
This class builds digest for an RFC 6283 XMLERS evidence record's renewal
-
Field Summary
Fields inherited from class eu.europa.esig.dss.evidencerecord.common.digest.AbstractEvidenceRecordRenewalDigestBuilder
detachedContent, digestAlgorithm, evidenceRecord
-
Constructor Summary
ConstructorDescriptionXMLEvidenceRecordRenewalDigestBuilder
(XmlEvidenceRecord xmlEvidenceRecord) Creates an instance ofXMLEvidenceRecordRenewalDigestBuilder
allowing to build hash forXmlEvidenceRecord
's renewal, with a default SHA256 digest algorithm to be used on hash-tree renewal computation (see note).XMLEvidenceRecordRenewalDigestBuilder
(XmlEvidenceRecord xmlEvidenceRecord, DigestAlgorithm digestAlgorithm) Creates an instance ofXMLEvidenceRecordRenewalDigestBuilder
allowing to build hash forXmlEvidenceRecord
's renewal, with the provideddigestAlgorithm
(see note below).Creates an instance ofXMLEvidenceRecordRenewalDigestBuilder
allowing to build hash for XML evidence recorddocument
's renewal, with a default SHA256 digest algorithm to be used on hash-tree renewal computation (see note).XMLEvidenceRecordRenewalDigestBuilder
(DSSDocument document, DigestAlgorithm digestAlgorithm) Creates an instance ofXMLEvidenceRecordRenewalDigestBuilder
allowing to build hash for XML evidence recorddocument
's renewal, with the provideddigestAlgorithm
(see note below). -
Method Summary
Modifier and TypeMethodDescriptionThis method builds digest for a hash-tree renewal.This method builds digest for a time-stamp renewalThis method returns a helper class containing supporting methods for digest computation in relation to an archive-time-stamp-sequencesetCanonicalizationMethod
(String canonicalizationMethod) Sets a canonicalization method to be used on hash-tree renewal Default: "http://www.w3.org/TR/2001/REC-xml-c14n-20010315" canonicalization algorithm Note: for time-stamp renewal, a canonicalization method defined within a corresponding ArchiveTimeStampChain is used.setDetachedContent
(List<DSSDocument> detachedContent) Sets detached content to be used for a digest group hash computation on hash-tree renewal NOTE : at least one of the documents from the original data group should be provided for a correct hash-tree renewalMethods inherited from class eu.europa.esig.dss.evidencerecord.common.digest.AbstractEvidenceRecordRenewalDigestBuilder
getDigestAlgorithm, getLastArchiveTimeStampChainObject, getLastArchiveTimeStampObject
-
Constructor Details
-
XMLEvidenceRecordRenewalDigestBuilder
Creates an instance ofXMLEvidenceRecordRenewalDigestBuilder
allowing to build hash for XML evidence recorddocument
's renewal, with a default SHA256 digest algorithm to be used on hash-tree renewal computation (see note). Builds digest for the last available ArchiveTimeStamp or ArchiveTimeStampChain, based on the called method. NOTE: time-stamp renewal uses digest algorithm extracted from the last ArchiveTimeStampChain.- Parameters:
document
-DSSDocument
-
XMLEvidenceRecordRenewalDigestBuilder
Creates an instance ofXMLEvidenceRecordRenewalDigestBuilder
allowing to build hash for XML evidence recorddocument
's renewal, with the provideddigestAlgorithm
(see note below). Builds digest for the last available ArchiveTimeStamp or ArchiveTimeStampChain, based on the called method. NOTE: time-stamp renewal uses digest algorithm extracted from the last ArchiveTimeStampChain.- Parameters:
document
-DSSDocument
digestAlgorithm
-DigestAlgorithm
to be used on hash-tree renewal hash computation
-
XMLEvidenceRecordRenewalDigestBuilder
Creates an instance ofXMLEvidenceRecordRenewalDigestBuilder
allowing to build hash forXmlEvidenceRecord
's renewal, with a default SHA256 digest algorithm to be used on hash-tree renewal computation (see note). Builds digest for the last available ArchiveTimeStamp or ArchiveTimeStampChain, based on the called method. NOTE: time-stamp renewal uses digest algorithm extracted from the last ArchiveTimeStampChain.- Parameters:
xmlEvidenceRecord
-XmlEvidenceRecord
-
XMLEvidenceRecordRenewalDigestBuilder
public XMLEvidenceRecordRenewalDigestBuilder(XmlEvidenceRecord xmlEvidenceRecord, DigestAlgorithm digestAlgorithm) Creates an instance ofXMLEvidenceRecordRenewalDigestBuilder
allowing to build hash forXmlEvidenceRecord
's renewal, with the provideddigestAlgorithm
(see note below). Builds digest for the last available ArchiveTimeStamp or ArchiveTimeStampChain, based on the called method. NOTE: time-stamp renewal uses digest algorithm extracted from the last ArchiveTimeStampChain.- Parameters:
xmlEvidenceRecord
-XmlEvidenceRecord
digestAlgorithm
-DigestAlgorithm
to be used on hash-tree renewal hash computation
-
-
Method Details
-
setCanonicalizationMethod
public XMLEvidenceRecordRenewalDigestBuilder setCanonicalizationMethod(String canonicalizationMethod) Sets a canonicalization method to be used on hash-tree renewal Default: "http://www.w3.org/TR/2001/REC-xml-c14n-20010315" canonicalization algorithm Note: for time-stamp renewal, a canonicalization method defined within a corresponding ArchiveTimeStampChain is used.- Parameters:
canonicalizationMethod
-String
- Returns:
- this
XMLEvidenceRecordRenewalDigestBuilder
-
setDetachedContent
Description copied from class:AbstractEvidenceRecordRenewalDigestBuilder
Sets detached content to be used for a digest group hash computation on hash-tree renewal NOTE : at least one of the documents from the original data group should be provided for a correct hash-tree renewal- Overrides:
setDetachedContent
in classAbstractEvidenceRecordRenewalDigestBuilder
- Parameters:
detachedContent
- a list ofDSSDocument
detached documents- Returns:
- this builder
-
buildTimeStampRenewalDigest
Description copied from interface:EvidenceRecordRenewalDigestBuilder
This method builds digest for a time-stamp renewal- Specified by:
buildTimeStampRenewalDigest
in interfaceEvidenceRecordRenewalDigestBuilder
- Specified by:
buildTimeStampRenewalDigest
in classAbstractEvidenceRecordRenewalDigestBuilder
- Returns:
Digest
-
buildHashTreeRenewalDigestGroup
Description copied from interface:EvidenceRecordRenewalDigestBuilder
This method builds digest for a hash-tree renewal. NOTE: the corresponding detached contents may be required to be provided- Returns:
- a list of
Digest
s
-
getArchiveTimeStampSequenceDigestHelper
This method returns a helper class containing supporting methods for digest computation in relation to an archive-time-stamp-sequence
-