FileDocCategorySizeDatePackage
SafeBag.javaAPI DocAndroid 1.5 API1867Wed May 06 22:41:06 BST 2009org.bouncycastle.asn1.pkcs

SafeBag

public class SafeBag extends org.bouncycastle.asn1.ASN1Encodable

Fields Summary
org.bouncycastle.asn1.DERObjectIdentifier
bagId
org.bouncycastle.asn1.DERObject
bagValue
org.bouncycastle.asn1.ASN1Set
bagAttributes
Constructors Summary
public SafeBag(org.bouncycastle.asn1.DERObjectIdentifier oid, org.bouncycastle.asn1.DERObject obj)

        this.bagId = oid;
        this.bagValue = obj;
        this.bagAttributes = null;
    
public SafeBag(org.bouncycastle.asn1.DERObjectIdentifier oid, org.bouncycastle.asn1.DERObject obj, org.bouncycastle.asn1.ASN1Set bagAttributes)

        this.bagId = oid;
        this.bagValue = obj;
        this.bagAttributes = bagAttributes;
    
public SafeBag(org.bouncycastle.asn1.ASN1Sequence seq)

        this.bagId = (DERObjectIdentifier)seq.getObjectAt(0);
        this.bagValue = ((DERTaggedObject)seq.getObjectAt(1)).getObject();
        if (seq.size() == 3)
        {
            this.bagAttributes = (ASN1Set)seq.getObjectAt(2);
        }
    
Methods Summary
public org.bouncycastle.asn1.ASN1SetgetBagAttributes()

        return bagAttributes;
    
public org.bouncycastle.asn1.DERObjectIdentifiergetBagId()

        return bagId;
    
public org.bouncycastle.asn1.DERObjectgetBagValue()

        return bagValue;
    
public org.bouncycastle.asn1.DERObjecttoASN1Object()

        ASN1EncodableVector v = new ASN1EncodableVector();

        v.add(bagId);
        v.add(new DERTaggedObject(0, bagValue));

        if (bagAttributes != null)
        {
            v.add(bagAttributes);
        }

        return new DERSequence(v);