Class XAdESTimestampMessageDigestBuilder
java.lang.Object
eu.europa.esig.dss.xades.validation.timestamp.XAdESTimestampMessageDigestBuilder
- All Implemented Interfaces:
TimestampMessageDigestBuilder
public class XAdESTimestampMessageDigestBuilder
extends Object
implements TimestampMessageDigestBuilder
Builds a message-imprint for XAdES timestamps
-
Constructor Summary
ConstructorDescriptionXAdESTimestampMessageDigestBuilder
(XAdESSignature signature, DigestAlgorithm digestAlgorithm) Default constructor to be used for a new timestamp creation.XAdESTimestampMessageDigestBuilder
(XAdESSignature signature, TimestampToken timestampToken) Constructor to be used for existing timestamp message-imprint computation. -
Method Summary
Modifier and TypeMethodDescriptionprotected DSSMessageDigest
Returns the computed message-imprint digest for xades132:AllDataObjectsTimestamp tokenArchive timestamp seals the data of the signature in a specific order.Returns the content timestamp message-imprint digest (timestamped or to be).protected DSSMessageDigest
Returns the computed message-imprint digest for xades132:IndividualDataObjectsTimestamp tokenReturns the message-imprint digest on data (signature value) that was timestamped by the SignatureTimeStamp for the given timestamp.Returns the message-imprint digest to be time-stamped.Returns the data to be time-stamped which contains the concatenation of CompleteCertificateRefs and CompleteRevocationRefs elements (XAdES example).setCanonicalizationAlgorithm
(String canonicalizationAlgorithm) Sets the canonicalization algorithm to be used for message-digest computationsetEn319132
(boolean en319132) Sets whether the message-digest should be computed for a EN 319 132-1 standard timestamp tokensetTimestampAttribute
(XAdESAttribute timestampAttribute) Sets a signature attribute corresponding to the time-stamp token.
-
Constructor Details
-
XAdESTimestampMessageDigestBuilder
public XAdESTimestampMessageDigestBuilder(XAdESSignature signature, DigestAlgorithm digestAlgorithm) Default constructor to be used for a new timestamp creation. This constructor requires certain properties to be provided for message-digest computation (see available setters).- Parameters:
signature
-XAdESSignature
containing timestamps to calculate message-imprint digest fordigestAlgorithm
-DigestAlgorithm
to be used for message-imprint digest computation
-
XAdESTimestampMessageDigestBuilder
Constructor to be used for existing timestamp message-imprint computation.- Parameters:
signature
-XAdESSignature
signature associated with the timestamptimestampToken
-TimestampToken
to compute message-digest for
-
-
Method Details
-
setCanonicalizationAlgorithm
public XAdESTimestampMessageDigestBuilder setCanonicalizationAlgorithm(String canonicalizationAlgorithm) Sets the canonicalization algorithm to be used for message-digest computation- Parameters:
canonicalizationAlgorithm
-String
- Returns:
- this
XAdESTimestampMessageDigestBuilder
-
setEn319132
Sets whether the message-digest should be computed for a EN 319 132-1 standard timestamp token- Parameters:
en319132
- whether the timestamp is of EN 319 132-1 format- Returns:
- this
XAdESTimestampMessageDigestBuilder
-
setTimestampAttribute
Sets a signature attribute corresponding to the time-stamp token. Defined alsoen319132
based on the provided timestamp attribute.- Parameters:
timestampAttribute
-XAdESAttribute
- Returns:
- this
XAdESTimestampMessageDigestBuilder
-
getContentTimestampMessageDigest
Description copied from interface:TimestampMessageDigestBuilder
Returns the content timestamp message-imprint digest (timestamped or to be).- Specified by:
getContentTimestampMessageDigest
in interfaceTimestampMessageDigestBuilder
- Returns:
DSSMessageDigest
representing the message digest on canonicalized data to be timestamped
-
getAllDataObjectsTimestampMessageDigest
Returns the computed message-imprint digest for xades132:AllDataObjectsTimestamp token- Returns:
DSSMessageDigest
message-imprint digest
-
getIndividualDataObjectsTimestampMessageDigest
Returns the computed message-imprint digest for xades132:IndividualDataObjectsTimestamp token- Returns:
DSSMessageDigest
message-imprint digest
-
getSignatureTimestampMessageDigest
Description copied from interface:TimestampMessageDigestBuilder
Returns the message-imprint digest on data (signature value) that was timestamped by the SignatureTimeStamp for the given timestamp.- Specified by:
getSignatureTimestampMessageDigest
in interfaceTimestampMessageDigestBuilder
- Returns:
DSSMessageDigest
representing the message-digest on canonicalized data to be timestamped
-
getTimestampX1MessageDigest
Description copied from interface:TimestampMessageDigestBuilder
Returns the message-imprint digest to be time-stamped. The data used to create digest contains the digital signature (XAdES example: ds:SignatureValue element), the signature time-stamp(s) present in the AdES-T form, the certification path references and the revocation status references.- Specified by:
getTimestampX1MessageDigest
in interfaceTimestampMessageDigestBuilder
- Returns:
DSSMessageDigest
representing the message digest on canonicalized data to be timestamped
-
getTimestampX2MessageDigest
Description copied from interface:TimestampMessageDigestBuilder
Returns the data to be time-stamped which contains the concatenation of CompleteCertificateRefs and CompleteRevocationRefs elements (XAdES example).- Specified by:
getTimestampX2MessageDigest
in interfaceTimestampMessageDigestBuilder
- Returns:
DSSMessageDigest
representing the message digest on canonicalized data to be timestamped
-
getArchiveTimestampMessageDigest
Description copied from interface:TimestampMessageDigestBuilder
Archive timestamp seals the data of the signature in a specific order. We need to retrieve the data for each timestamp.- Specified by:
getArchiveTimestampMessageDigest
in interfaceTimestampMessageDigestBuilder
- Returns:
DSSMessageDigest
representing the message digest on canonicalized data to be timestamped
-