Class TimeStampTokenInfo

java.lang.Object
org.bouncycastle.tsp.TimeStampTokenInfo

public class TimeStampTokenInfo extends Object
Wrapper providing typed access to the TSTInfo structure 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 Details

    • 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 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 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 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 IOException
      Returns:
      the default ASN.1 encoding of the underlying TSTInfo.
      Throws:
      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.