public class TSAClientIAIK
extends java.lang.Object
implements com.itextpdf.text.pdf.security.TSAClient
| Constructor and Description |
|---|
TSAClientIAIK(java.lang.String url)
Constructor using a TSA, that needs no authentication.
|
TSAClientIAIK(java.lang.String url,
java.lang.String username,
java.lang.String password)
Constructor using a TSA requiring authentication.
|
TSAClientIAIK(java.lang.String url,
java.lang.String username,
java.lang.String password,
int tokSzEstimate,
java.lang.String digestAlgorithm)
Constructor using a TSA requiring authentication.
|
| Modifier and Type | Method and Description |
|---|---|
java.security.MessageDigest |
getMessageDigest()
Gets the MessageDigest, that shall be used to digest the data for the message imprint
|
byte[] |
getTimeStampToken(byte[] imprint)
Get timestamp token.
|
int |
getTokenSizeEstimate()
Get the token size estimate.
|
public TSAClientIAIK(java.lang.String url)
url - URL of the time stamp authoritypublic TSAClientIAIK(java.lang.String url,
java.lang.String username,
java.lang.String password)
url - URL of the time stamp authorityusername - username to authenticate at TSApassword - password to authenticate at TSApublic TSAClientIAIK(java.lang.String url,
java.lang.String username,
java.lang.String password,
int tokSzEstimate,
java.lang.String digestAlgorithm)
url - URL of the time stamp authorityusername - username to authenticate at TSApassword - password to authenticate at TSAtokSzEstimate - bytes that shall be reserved for the time stamp tokendigestAlgorithm - digest algorithm that has been used to hash the datapublic int getTokenSizeEstimate()
getTokenSizeEstimate in interface com.itextpdf.text.pdf.security.TSAClientpublic byte[] getTimeStampToken(byte[] imprint)
throws PdfSignatureException,
iaik.tsp.TspVerificationException
getTimeStampToken in interface com.itextpdf.text.pdf.security.TSAClientimprint - hashed data to be timestampedPdfSignatureException - if time stamp request can't be sent or time stamp token is not validiaik.tsp.TspVerificationExceptionpublic java.security.MessageDigest getMessageDigest()
throws java.security.GeneralSecurityException
getMessageDigest in interface com.itextpdf.text.pdf.security.TSAClientjava.security.GeneralSecurityException