FileDocCategorySizeDatePackage
SafeBag.javaAPI DocAzureus 3.0.3.41811Tue Jun 08 05:12:58 BST 2004org.bouncycastle.asn1.pkcs

SafeBag

public class SafeBag extends Object implements org.bouncycastle.asn1.DEREncodable

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.DERObjectgetDERObject()

        ASN1EncodableVector v = new ASN1EncodableVector();

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

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

        return new DERSequence(v);