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.
|
org.bouncycastle.cms.CMSSignedData |
timestamp(net.jsign.DigestAlgorithm algo,
org.bouncycastle.cms.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 org.bouncycastle.cms.CMSSignedData timestamp(net.jsign.DigestAlgorithm algo, org.bouncycastle.cms.CMSSignedData sigData) throws TimestampingException, IOException, org.bouncycastle.cms.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 attemptsorg.bouncycastle.cms.CMSException - if the signature cannot be generatedCopyright © 2012–2025. All rights reserved.