public abstract class Timestamper extends Object
| Constructor and Description |
|---|
Timestamper() |
| Modifier and Type | Method and Description |
|---|---|
static Timestamper |
create(TimestampingMode mode)
Returns the timestamper for the specified mode.
|
void |
setRetries(int retries)
Set the number of retries.
|
void |
setRetryWait(int retryWait)
Set the number of seconds to wait between retries.
|
void |
setURL(String tsaurl)
Set the URL of the timestamping service.
|
void |
setURLs(String... tsaurls)
Set the URLs of the timestamping services.
|
CMSSignedData |
timestamp(DigestAlgorithm algo,
CMSSignedData sigData)
Timestamp the specified signature.
|
public Timestamper()
public static Timestamper create(TimestampingMode mode)
mode - the timestamping modepublic void setRetries(int retries)
retries - the number of retriespublic void setRetryWait(int retryWait)
retryWait - the wait time between retries (in seconds)public void setURL(String tsaurl)
tsaurl - the URL of the timestamping servicepublic void setURLs(String... tsaurls)
tsaurls - the URLs of the timestamping servicespublic CMSSignedData timestamp(DigestAlgorithm algo, CMSSignedData sigData) throws TimestampingException, IOException, CMSException
algo - the digest algorithm used for the timestampsigData - the signed data to be timestampedIOException - if an I/O error occursTimestampingException - if the timestamping keeps failing after the configured number of attemptsCMSException - if the signature cannot be generatedCopyright © 2012–2020. All rights reserved.