Bouncy Castle Cryptography Library 1.45

## org.bouncycastle.tsp
Class TimeStampTokenGenerator

    java.lang.Object
      org.bouncycastle.tsp.TimeStampTokenGenerator

    public class TimeStampTokenGenerator

extends java.lang.Object

Constructor Summary
`TimeStampTokenGenerator(java.security.PrivateKey key, java.security.cert.X509Certificate cert, java.lang.String digestOID, java.lang.String tsaPolicyOID)` basic creation - only the default attributes will be included here.
`TimeStampTokenGenerator(java.security.PrivateKey key, java.security.cert.X509Certificate cert, java.lang.String digestOID, java.lang.String tsaPolicyOID, org.bouncycastle.asn1.cms.AttributeTable signedAttr, org.bouncycastle.asn1.cms.AttributeTable unsignedAttr)` create with a signer with extra signed/unsigned attributes.

Method Summary
`TimeStampToken` `generate(TimeStampRequest request, java.math.BigInteger serialNumber, java.util.Date genTime, java.lang.String provider)`
`void` `setAccuracyMicros(int accuracyMicros)`
`void` `setAccuracyMillis(int accuracyMillis)`
`void` `setAccuracySeconds(int accuracySeconds)`
`void` `setCertificatesAndCRLs(java.security.cert.CertStore certificates)`
`void` `setOrdering(boolean ordering)`
`void` `setTSA(org.bouncycastle.asn1.x509.GeneralName tsa)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TimeStampTokenGenerator

    public TimeStampTokenGenerator(java.security.PrivateKey key,
                                   java.security.cert.X509Certificate cert,
                                   java.lang.String digestOID,
                                   java.lang.String tsaPolicyOID)
                            throws java.lang.IllegalArgumentException,
                                   TSPException

  basic creation - only the default attributes will be included here.

  Throws:
    `java.lang.IllegalArgumentException`
    `TSPException`

### TimeStampTokenGenerator

    public TimeStampTokenGenerator(java.security.PrivateKey key,
                                   java.security.cert.X509Certificate cert,
                                   java.lang.String digestOID,
                                   java.lang.String tsaPolicyOID,
                                   org.bouncycastle.asn1.cms.AttributeTable signedAttr,
                                   org.bouncycastle.asn1.cms.AttributeTable unsignedAttr)
                            throws java.lang.IllegalArgumentException,
                                   TSPException

  create with a signer with extra signed/unsigned attributes.

  Throws:
    `java.lang.IllegalArgumentException`
    `TSPException`

Method Detail

### setCertificatesAndCRLs

    public void setCertificatesAndCRLs(java.security.cert.CertStore certificates)
                                throws java.security.cert.CertStoreException,
                                       TSPException

  Throws:
    `java.security.cert.CertStoreException`
    `TSPException`

### setAccuracySeconds

    public void setAccuracySeconds(int accuracySeconds)

### setAccuracyMillis

    public void setAccuracyMillis(int accuracyMillis)

### setAccuracyMicros

    public void setAccuracyMicros(int accuracyMicros)

### setOrdering

    public void setOrdering(boolean ordering)

### setTSA

    public void setTSA(org.bouncycastle.asn1.x509.GeneralName tsa)

### generate

    public TimeStampToken generate(TimeStampRequest request,
                                   java.math.BigInteger serialNumber,
                                   java.util.Date genTime,
                                   java.lang.String provider)
                            throws java.security.NoSuchAlgorithmException,
                                   java.security.NoSuchProviderException,
                                   TSPException

  Throws:
    `java.security.NoSuchAlgorithmException`
    `java.security.NoSuchProviderException`
    `TSPException`

Bouncy Castle Cryptography Library 1.45