TSAClientpublic class TSAClientBouncyCastle extends java.lang.Object implements TSAClient
Created by Aiken Sam, 2006-11-15, refactored by Martin Brunecky, 07/15/2007 for ease of subclassing.
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
DEFAULTHASHALGORITHM |
The default value for the hash algorithm
|
static int |
DEFAULTTOKENSIZE |
The default value for the hash algorithm
|
protected java.lang.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 java.lang.String |
tsaPassword |
TSA password
|
protected java.lang.String |
tsaURL |
URL of the Time Stamp Authority
|
protected java.lang.String |
tsaUsername |
TSA Username
|
| Constructor | Description |
|---|---|
TSAClientBouncyCastle(java.lang.String url) |
Creates an instance of a TSAClient that will use BouncyCastle.
|
TSAClientBouncyCastle(java.lang.String url,
java.lang.String username,
java.lang.String password) |
Creates an instance of a TSAClient that will use BouncyCastle.
|
TSAClientBouncyCastle(java.lang.String url,
java.lang.String username,
java.lang.String password,
int tokSzEstimate,
java.lang.String digestAlgorithm) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.security.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.
|
java.lang.String |
getTSAReqPolicy() |
|
protected byte[] |
getTSAResponse(byte[] requestBytes) |
Get timestamp token - communications layer
|
void |
setTSAInfo(TSAInfoBouncyCastle tsaInfo) |
|
void |
setTSAReqPolicy(java.lang.String tsaReqPolicy) |
protected java.lang.String tsaURL
protected java.lang.String tsaUsername
protected java.lang.String tsaPassword
protected TSAInfoBouncyCastle tsaInfo
public static final int DEFAULTTOKENSIZE
protected int tokenSizeEstimate
public static final java.lang.String DEFAULTHASHALGORITHM
protected java.lang.String digestAlgorithm
public TSAClientBouncyCastle(java.lang.String url)
url - String - Time Stamp Authority URL (i.e. "http://tsatest1.digistamp.com/TSA")public TSAClientBouncyCastle(java.lang.String url,
java.lang.String username,
java.lang.String password)
url - String - Time Stamp Authority URL (i.e. "http://tsatest1.digistamp.com/TSA")username - String - user(account) namepassword - String - passwordpublic TSAClientBouncyCastle(java.lang.String url,
java.lang.String username,
java.lang.String password,
int tokSzEstimate,
java.lang.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)public void setTSAInfo(TSAInfoBouncyCastle tsaInfo)
tsaInfo - the tsaInfo to setpublic int getTokenSizeEstimate()
getTokenSizeEstimate in interface TSAClientpublic java.lang.String getTSAReqPolicy()
public void setTSAReqPolicy(java.lang.String tsaReqPolicy)
public java.security.MessageDigest getMessageDigest()
throws java.security.GeneralSecurityException
getMessageDigest in interface TSAClientjava.security.GeneralSecurityExceptionpublic byte[] getTimeStampToken(byte[] imprint)
throws java.io.IOException,
org.bouncycastle.tsp.TSPException
getTimeStampToken in interface TSAClientimprint - data imprint to be time-stampedjava.io.IOExceptionorg.bouncycastle.tsp.TSPExceptionprotected byte[] getTSAResponse(byte[] requestBytes)
throws java.io.IOException
java.io.IOExceptionCopyright © 1998–2018. All rights reserved.