Class JAdESTimestampMessageDigestBuilder
java.lang.Object
eu.europa.esig.dss.jades.validation.timestamp.JAdESTimestampMessageDigestBuilder
- All Implemented Interfaces:
TimestampMessageDigestBuilder
public class JAdESTimestampMessageDigestBuilder
extends Object
implements TimestampMessageDigestBuilder
Builds the message-imprint digest for JAdES timestamps
-
Constructor Summary
ConstructorDescriptionJAdESTimestampMessageDigestBuilder
(JAdESSignature signature, DigestAlgorithm digestAlgorithm) The constructor to compute message-imprint for timestamps related to thesignature
JAdESTimestampMessageDigestBuilder
(JAdESSignature signature, TimestampToken timestampToken) The constructor to compute message-imprint for timestamps related to thesignature
-
Method Summary
Modifier and TypeMethodDescriptionArchive timestamp seals the data of the signature in a specific order.Returns the content timestamp message-imprint digest (timestamped or to be).Returns 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 computationsetTimestampAttribute
(JAdESAttribute timestampAttribute) Sets a signature attribute identifying the time-stamp token
-
Constructor Details
-
JAdESTimestampMessageDigestBuilder
public JAdESTimestampMessageDigestBuilder(JAdESSignature signature, DigestAlgorithm digestAlgorithm) The constructor to compute message-imprint for timestamps related to thesignature
- Parameters:
signature
-JAdESSignature
to create timestamps fordigestAlgorithm
-DigestAlgorithm
to be used for message-imprint digest computation
-
JAdESTimestampMessageDigestBuilder
The constructor to compute message-imprint for timestamps related to thesignature
- Parameters:
signature
-JAdESSignature
containing timestampstimestampToken
-TimestampToken
to compute message-digest for
-
-
Method Details
-
setCanonicalizationAlgorithm
public JAdESTimestampMessageDigestBuilder setCanonicalizationAlgorithm(String canonicalizationAlgorithm) Sets the canonicalization algorithm to be used for message-digest computation- Parameters:
canonicalizationAlgorithm
-String
- Returns:
- this
JAdESTimestampMessageDigestBuilder
-
setTimestampAttribute
Sets a signature attribute identifying the time-stamp token- Parameters:
timestampAttribute
-JAdESAttribute
- Returns:
- this
JAdESTimestampMessageDigestBuilder
-
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
-
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
-