Package com.itextpdf.signatures
Interface ITSAClient
-
- All Known Implementing Classes:
TSAClientBouncyCastle
public interface ITSAClient
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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.security.MessageDigest
getMessageDigest()
Returns theMessageDigest
to digest the data imprintbyte[]
getTimeStampToken(byte[] imprint)
Returns RFC 3161 timeStampToken.int
getTokenSizeEstimate()
Get the time stamp estimated token size.
-
-
-
Method Detail
-
getTokenSizeEstimate
int getTokenSizeEstimate()
Get the time stamp estimated token size. Implementation must return value large enough to accommodate the entire token returned bygetTimeStampToken(byte[])
prior to actualgetTimeStampToken(byte[])
call.- Returns:
- an estimate of the token size
-
getMessageDigest
java.security.MessageDigest getMessageDigest() throws java.security.GeneralSecurityException
Returns theMessageDigest
to digest the data imprint- Returns:
- The
MessageDigest
object. - Throws:
java.security.GeneralSecurityException
- the general security exception
-
getTimeStampToken
byte[] getTimeStampToken(byte[] imprint) throws java.lang.Exception
Returns RFC 3161 timeStampToken.- 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
-
-