FileDocCategorySizeDatePackage
AttributeCertificate.javaAPI DocAndroid 1.5 API2617Wed May 06 22:41:06 BST 2009org.bouncycastle.asn1.x509

AttributeCertificate

public class AttributeCertificate extends org.bouncycastle.asn1.ASN1Encodable

Fields Summary
AttributeCertificateInfo
acinfo
AlgorithmIdentifier
signatureAlgorithm
org.bouncycastle.asn1.DERBitString
signatureValue
Constructors Summary
public AttributeCertificate(AttributeCertificateInfo acinfo, AlgorithmIdentifier signatureAlgorithm, org.bouncycastle.asn1.DERBitString signatureValue)

        this.acinfo = acinfo;
        this.signatureAlgorithm = signatureAlgorithm;
        this.signatureValue = signatureValue;
    
public AttributeCertificate(org.bouncycastle.asn1.ASN1Sequence seq)

        if (seq.size() != 3)
        {
            throw new IllegalArgumentException("Bad sequence size: "
                    + seq.size());
        }

        this.acinfo = AttributeCertificateInfo.getInstance(seq.getObjectAt(0));
        this.signatureAlgorithm = AlgorithmIdentifier.getInstance(seq.getObjectAt(1));
        this.signatureValue = DERBitString.getInstance(seq.getObjectAt(2));
    
Methods Summary
public AttributeCertificateInfogetAcinfo()

        return acinfo;
    
public static org.bouncycastle.asn1.x509.AttributeCertificategetInstance(java.lang.Object obj)

param
obj
return
an AttributeCertificate object

        if (obj instanceof AttributeCertificate)
        {
            return (AttributeCertificate)obj;
        }
        else if (obj instanceof ASN1Sequence)
        {
            return new AttributeCertificate((ASN1Sequence)obj);
        }

        throw new IllegalArgumentException("unknown object in factory");
    
public AlgorithmIdentifiergetSignatureAlgorithm()

        return signatureAlgorithm;
    
public org.bouncycastle.asn1.DERBitStringgetSignatureValue()

        return signatureValue;
    
public org.bouncycastle.asn1.DERObjecttoASN1Object()
Produce an object suitable for an ASN1OutputStream.
AttributeCertificate ::= SEQUENCE {
acinfo AttributeCertificateInfo,
signatureAlgorithm AlgorithmIdentifier,
signatureValue BIT STRING
}

        ASN1EncodableVector  v = new ASN1EncodableVector();

        v.add(acinfo);
        v.add(signatureAlgorithm);
        v.add(signatureValue);

        return new DERSequence(v);