FileDocCategorySizeDatePackage
TimeStampReq.javaAPI DocAndroid 1.5 API7036Wed May 06 22:41:06 BST 2009org.apache.harmony.security.x509.tsp

TimeStampReq

public class TimeStampReq extends Object
As defined in Time-Stamp Protocol (TSP) (http://www.ietf.org/rfc/rfc3161.txt) TimeStampReq ::= SEQUENCE { version INTEGER { v1(1) }, messageImprint MessageImprint, --a hash algorithm OID and the hash value of the data to be --time-stamped reqPolicy TSAPolicyId OPTIONAL, nonce INTEGER OPTIONAL, certReq BOOLEAN DEFAULT FALSE, extensions [0] IMPLICIT Extensions OPTIONAL } TSAPolicyId ::= OBJECT IDENTIFIER

Fields Summary
private final int
version
private final MessageImprint
messageImprint
private final String
reqPolicy
private final BigInteger
nonce
private final Boolean
certReq
private final org.apache.harmony.security.x509.Extensions
extensions
private byte[]
encoding
public static final org.apache.harmony.security.asn1.ASN1Sequence
ASN1
Constructors Summary
public TimeStampReq(int version, MessageImprint messageImprint, String reqPolicy, BigInteger nonce, Boolean certReq, org.apache.harmony.security.x509.Extensions extensions)

        this.version = version;
        this.messageImprint = messageImprint;
        this.reqPolicy = reqPolicy;
        this.nonce = nonce;
        this.certReq = certReq;
        this.extensions = extensions;
    
private TimeStampReq(int version, MessageImprint messageImprint, String reqPolicy, BigInteger nonce, Boolean certReq, org.apache.harmony.security.x509.Extensions extensions, byte[] encoding)

        this (version, messageImprint, reqPolicy, nonce, certReq, extensions);
        this.encoding = encoding;
    
Methods Summary
public java.lang.BooleangetCertReq()

return
Returns the certReq.

        return certReq;
    
public byte[]getEncoded()
Returns ASN.1 encoded form of this TimeStampReq.

return
a byte array containing ASN.1 encoded form.

        if (encoding == null) {
            encoding = ASN1.encode(this);
        }
        return encoding;
    
public org.apache.harmony.security.x509.ExtensionsgetExtensions()

return
Returns the extensions.

        return extensions;
    
public MessageImprintgetMessageImprint()

return
Returns the messageImprint.

        return messageImprint;
    
public java.math.BigIntegergetNonce()

return
Returns the nonce.

        return nonce;
    
public java.lang.StringgetReqPolicy()

return
Returns the reqPolicy.

        return reqPolicy;
    
public intgetVersion()

return
Returns the version.

        return version;
    
public java.lang.StringtoString()

        StringBuffer res = new StringBuffer();
        res.append("-- TimeStampReq:");
        res.append("\nversion : ");
        res.append(version);
        res.append("\nmessageImprint:  ");
        res.append(messageImprint);
        res.append("\nreqPolicy:  ");
        res.append(reqPolicy);
        res.append("\nnonce:  ");
        res.append(nonce);
        res.append("\ncertReq:  ");
        res.append(certReq);
        res.append("\nextensions:  ");
        res.append(extensions);
        res.append("\n-- TimeStampReq End\n");
        return res.toString();