Package com.itextpdf.text.pdf.security
Interface TSAClient
-
- All Known Implementing Classes:
TSAClientBouncyCastle
public interface TSAClient
Time Stamp Authority client (caller) interface.Interface used by the PdfPKCS7 digital signature builder to call Time Stamp Authority providing RFC 3161 compliant time stamp token.
- Since:
- 2.1.6
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.security.MessageDigest
getMessageDigest()
Gets the MessageDigest to digest the data imprintbyte[]
getTimeStampToken(byte[] imprint)
Get RFC 3161 timeStampToken.int
getTokenSizeEstimate()
Get the time stamp token size estimate.
-
-
-
Method Detail
-
getTokenSizeEstimate
int getTokenSizeEstimate()
Get the time stamp token size estimate. Implementation must return value large enough to accomodate the entire token returned by getTimeStampToken() _prior_ to actual getTimeStampToken() call.- Returns:
- an estimate of the token size
-
getMessageDigest
java.security.MessageDigest getMessageDigest() throws java.security.GeneralSecurityException
Gets the MessageDigest to digest the data imprint- Returns:
- the digest algorithm name
- Throws:
java.security.GeneralSecurityException
-
getTimeStampToken
byte[] getTimeStampToken(byte[] imprint) throws java.lang.Exception
Get RFC 3161 timeStampToken. Method may return null indicating that timestamp should be skipped.- Parameters:
imprint
- byte[] - data imprint to be time-stamped- Returns:
- byte[] - encoded, TSA signed data of the timeStampToken
- Throws:
java.lang.Exception
- - TSA request failed
-
-