Class JAdESTimestampDataBuilder
java.lang.Object
eu.europa.esig.dss.jades.validation.timestamp.JAdESTimestampDataBuilder
- All Implemented Interfaces:
TimestampDataBuilder
public class JAdESTimestampDataBuilder extends Object implements TimestampDataBuilder
Builds the message-imprint for JAdES timestamps
-
Constructor Summary
Constructors Constructor Description JAdESTimestampDataBuilder(JAdESSignature signature)
Default constructor -
Method Summary
Modifier and Type Method Description DSSDocument
getArchiveTimestampData(TimestampToken timestampToken)
Archive timestamp seals the data of the signature in a specific order.protected byte[]
getArchiveTimestampData(TimestampToken timestampToken, String canonicalizationMethod)
Returns the message-imprint computed for the archivetimestampToken
byte[]
getArchiveTimestampData(String canonicalizationMethod)
Returns ArchiveTimestamp Data for a new TimestampDSSDocument
getContentTimestampData(TimestampToken timestampToken)
Returns the content timestamp data (timestamped or to be).byte[]
getSignatureTimestampData()
Returns the message-imprint data for a SignatureTimestamp (BASE64URL(JWS Signature Value))DSSDocument
getSignatureTimestampData(TimestampToken timestampToken)
Returns the data (signature value) that was timestamped by the SignatureTimeStamp for the given timestamp.DSSDocument
getTimestampX1Data(TimestampToken timestampToken)
Returns the data to be time-stamped.DSSDocument
getTimestampX2Data(TimestampToken timestampToken)
Returns the data to be time-stamped which contains the concatenation of CompleteCertificateRefs and CompleteRevocationRefs elements (XAdES example).
-
Constructor Details
-
JAdESTimestampDataBuilder
Default constructor- Parameters:
signature
-JAdESSignature
-
-
Method Details
-
getContentTimestampData
Description copied from interface:TimestampDataBuilder
Returns the content timestamp data (timestamped or to be).- Specified by:
getContentTimestampData
in interfaceTimestampDataBuilder
- Parameters:
timestampToken
-TimestampToken
- Returns:
DSSDocument
representing the canonicalized data to be timestamped
-
getSignatureTimestampData
Description copied from interface:TimestampDataBuilder
Returns the data (signature value) that was timestamped by the SignatureTimeStamp for the given timestamp.- Specified by:
getSignatureTimestampData
in interfaceTimestampDataBuilder
- Parameters:
timestampToken
-TimestampToken
- Returns:
DSSDocument
representing the canonicalized data to be timestamped
-
getSignatureTimestampData
public byte[] getSignatureTimestampData()Returns the message-imprint data for a SignatureTimestamp (BASE64URL(JWS Signature Value))- Returns:
- byte array representing a message-imprint
-
getTimestampX1Data
Description copied from interface:TimestampDataBuilder
Returns the data to be time-stamped. The data 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:
getTimestampX1Data
in interfaceTimestampDataBuilder
- Parameters:
timestampToken
-TimestampToken
or null during the creation process- Returns:
DSSDocument
representing the canonicalized data to be timestamped
-
getTimestampX2Data
Description copied from interface:TimestampDataBuilder
Returns the data to be time-stamped which contains the concatenation of CompleteCertificateRefs and CompleteRevocationRefs elements (XAdES example).- Specified by:
getTimestampX2Data
in interfaceTimestampDataBuilder
- Parameters:
timestampToken
-TimestampToken
- Returns:
DSSDocument
representing the canonicalized data to be timestamped
-
getArchiveTimestampData
Description copied from interface:TimestampDataBuilder
Archive timestamp seals the data of the signature in a specific order. We need to retrieve the data for each timestamp.- Specified by:
getArchiveTimestampData
in interfaceTimestampDataBuilder
- Parameters:
timestampToken
-TimestampToken
null when adding a new archive timestamp- Returns:
DSSDocument
representing the canonicalized data to be timestamped
-
getArchiveTimestampData
Returns ArchiveTimestamp Data for a new Timestamp- Parameters:
canonicalizationMethod
-String
canonicalization method to use- Returns:
- byte array timestamp data
-
getArchiveTimestampData
protected byte[] getArchiveTimestampData(TimestampToken timestampToken, String canonicalizationMethod)Returns the message-imprint computed for the archivetimestampToken
- Parameters:
timestampToken
-TimestampToken
archive timestamp tokencanonicalizationMethod
-String
if defined- Returns:
- message-imprint byte array
-