|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.itextpdf.text.pdf.security.TSAClientBouncyCastle
public class TSAClientBouncyCastle
Time Stamp Authority Client interface implementation using Bouncy Castle org.bouncycastle.tsp package.
Created by Aiken Sam, 2006-11-15, refactored by Martin Brunecky, 07/15/2007 for ease of subclassing.
Field Summary | |
---|---|
static String |
DEFAULTHASHALGORITHM
The default value for the hash algorithm |
static int |
DEFAULTTOKENSIZE
The default value for the hash algorithm |
protected String |
digestAlgorithm
Hash algorithm |
protected int |
tokenSizeEstimate
Estimate of the received time stamp token |
protected TSAInfoBouncyCastle |
tsaInfo
An interface that allows you to inspect the timestamp info. |
protected String |
tsaPassword
TSA password |
protected String |
tsaURL
URL of the Time Stamp Authority |
protected String |
tsaUsername
TSA Username |
Constructor Summary | |
---|---|
TSAClientBouncyCastle(String url)
Creates an instance of a TSAClient that will use BouncyCastle. |
|
TSAClientBouncyCastle(String url,
String username,
String password)
Creates an instance of a TSAClient that will use BouncyCastle. |
|
TSAClientBouncyCastle(String url,
String username,
String password,
int tokSzEstimate,
String digestAlgorithm)
Constructor. |
Method Summary | |
---|---|
MessageDigest |
getMessageDigest()
Gets the MessageDigest to digest the data imprint |
byte[] |
getTimeStampToken(byte[] imprint)
Get RFC 3161 timeStampToken. |
int |
getTokenSizeEstimate()
Get the token size estimate. |
protected byte[] |
getTSAResponse(byte[] requestBytes)
Get timestamp token - communications layer |
void |
setTSAInfo(TSAInfoBouncyCastle tsaInfo)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String tsaURL
protected String tsaUsername
protected String tsaPassword
protected TSAInfoBouncyCastle tsaInfo
public static final int DEFAULTTOKENSIZE
protected int tokenSizeEstimate
public static final String DEFAULTHASHALGORITHM
protected String digestAlgorithm
Constructor Detail |
---|
public TSAClientBouncyCastle(String url)
url
- String - Time Stamp Authority URL (i.e. "http://tsatest1.digistamp.com/TSA")public TSAClientBouncyCastle(String url, String username, String password)
url
- String - Time Stamp Authority URL (i.e. "http://tsatest1.digistamp.com/TSA")username
- String - user(account) namepassword
- String - passwordpublic TSAClientBouncyCastle(String url, String username, String password, int tokSzEstimate, String digestAlgorithm)
url
- String - Time Stamp Authority URL (i.e. "http://tsatest1.digistamp.com/TSA")username
- String - user(account) namepassword
- String - passwordtokSzEstimate
- int - estimated size of received time stamp token (DER encoded)Method Detail |
---|
public void setTSAInfo(TSAInfoBouncyCastle tsaInfo)
tsaInfo
- the tsaInfo to setpublic int getTokenSizeEstimate()
getTokenSizeEstimate
in interface TSAClient
public MessageDigest getMessageDigest() throws GeneralSecurityException
getMessageDigest
in interface TSAClient
GeneralSecurityException
public byte[] getTimeStampToken(byte[] imprint) throws IOException, org.bouncycastle.tsp.TSPException
getTimeStampToken
in interface TSAClient
imprint
- data imprint to be time-stamped
IOException
org.bouncycastle.tsp.TSPException
protected byte[] getTSAResponse(byte[] requestBytes) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |