Package org.bouncycastle.tsp
Class TimeStampTokenInfo
- java.lang.Object
-
- org.bouncycastle.tsp.TimeStampTokenInfo
-
public class TimeStampTokenInfo extends java.lang.ObjectWrapper providing typed access to theTSTInfostructure carried by an RFC 3161 time-stamp token - the time of stamping (genTime), its accuracy, the TSA policy, serial number, nonce and the message imprint that was stamped.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.bouncycastle.asn1.tsp.AccuracygetAccuracy()byte[]getEncoded()org.bouncycastle.asn1.x509.ExtensionsgetExtensions()java.util.DategetGenTime()GenTimeAccuracygetGenTimeAccuracy()org.bouncycastle.asn1.x509.AlgorithmIdentifiergetHashAlgorithm()org.bouncycastle.asn1.ASN1ObjectIdentifiergetMessageImprintAlgOID()byte[]getMessageImprintDigest()java.math.BigIntegergetNonce()org.bouncycastle.asn1.ASN1ObjectIdentifiergetPolicy()java.math.BigIntegergetSerialNumber()org.bouncycastle.asn1.x509.GeneralNamegetTsa()booleanisOrdered()org.bouncycastle.asn1.tsp.TSTInfotoASN1Structure()org.bouncycastle.asn1.tsp.TSTInfotoTSTInfo()Deprecated.use toASN1Structure
-
-
-
Method Detail
-
isOrdered
public boolean isOrdered()
- Returns:
- true if the genTime can be ordered against tokens from the same TSA, false otherwise.
-
getAccuracy
public org.bouncycastle.asn1.tsp.Accuracy getAccuracy()
- Returns:
- the accuracy of the genTime as an ASN.1 structure, null if not present.
-
getGenTime
public java.util.Date getGenTime()
- Returns:
- the time the token was created (the genTime field).
-
getGenTimeAccuracy
public GenTimeAccuracy getGenTimeAccuracy()
- Returns:
- a wrapper over the accuracy of the genTime, null if no accuracy is present.
-
getPolicy
public org.bouncycastle.asn1.ASN1ObjectIdentifier getPolicy()
- Returns:
- the OID of the TSA policy under which the token was issued.
-
getSerialNumber
public java.math.BigInteger getSerialNumber()
- Returns:
- the serial number assigned to this token by the TSA.
-
getTsa
public org.bouncycastle.asn1.x509.GeneralName getTsa()
- Returns:
- the optional name of the TSA that issued the token, null if not present.
-
getExtensions
public org.bouncycastle.asn1.x509.Extensions getExtensions()
- Returns:
- any extensions present in the token, null if there are none.
-
getNonce
public java.math.BigInteger getNonce()
- Returns:
- the nonce value, null if there isn't one.
-
getHashAlgorithm
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getHashAlgorithm()
- Returns:
- the algorithm used to produce the stamped message imprint.
-
getMessageImprintAlgOID
public org.bouncycastle.asn1.ASN1ObjectIdentifier getMessageImprintAlgOID()
- Returns:
- the OID of the algorithm used to produce the stamped message imprint.
-
getMessageImprintDigest
public byte[] getMessageImprintDigest()
- Returns:
- the digest value of the stamped message imprint.
-
getEncoded
public byte[] getEncoded() throws java.io.IOException- Returns:
- the default ASN.1 encoding of the underlying TSTInfo.
- Throws:
java.io.IOException- if the structure cannot be encoded.
-
toTSTInfo
public org.bouncycastle.asn1.tsp.TSTInfo toTSTInfo()
Deprecated.use toASN1Structure
-
toASN1Structure
public org.bouncycastle.asn1.tsp.TSTInfo toASN1Structure()
- Returns:
- the underlying ASN.1 TSTInfo structure.
-
-