FileDocCategorySizeDatePackage
OtherRecipientInfo.javaAPI DocAndroid 1.5 API2752Wed May 06 22:41:06 BST 2009org.bouncycastle.asn1.cms

OtherRecipientInfo

public class OtherRecipientInfo extends org.bouncycastle.asn1.ASN1Encodable

Fields Summary
private org.bouncycastle.asn1.DERObjectIdentifier
oriType
private org.bouncycastle.asn1.DEREncodable
oriValue
Constructors Summary
public OtherRecipientInfo(org.bouncycastle.asn1.DERObjectIdentifier oriType, org.bouncycastle.asn1.DEREncodable oriValue)

        this.oriType = oriType;
        this.oriValue = oriValue;
    
public OtherRecipientInfo(org.bouncycastle.asn1.ASN1Sequence seq)

        oriType = DERObjectIdentifier.getInstance(seq.getObjectAt(1));
        oriValue = seq.getObjectAt(2);
    
Methods Summary
public static org.bouncycastle.asn1.cms.OtherRecipientInfogetInstance(org.bouncycastle.asn1.ASN1TaggedObject obj, boolean explicit)
return a OtherRecipientInfo object from a tagged object.

param
obj the tagged object holding the object we want.
param
explicit true if the object is meant to be explicitly tagged false otherwise.
exception
IllegalArgumentException if the object held by the tagged object cannot be converted.

        return getInstance(ASN1Sequence.getInstance(obj, explicit));
    
public static org.bouncycastle.asn1.cms.OtherRecipientInfogetInstance(java.lang.Object obj)
return a OtherRecipientInfo object from the given object.

param
obj the object we want converted.
exception
IllegalArgumentException if the object cannot be converted.

        if (obj == null || obj instanceof OtherRecipientInfo)
        {
            return (OtherRecipientInfo)obj;
        }
        
        if (obj instanceof ASN1Sequence)
        {
            return new OtherRecipientInfo((ASN1Sequence)obj);
        }
        
        throw new IllegalArgumentException("Invalid OtherRecipientInfo: " + obj.getClass().getName());
    
public org.bouncycastle.asn1.DERObjectIdentifiergetType()

        return oriType;
    
public org.bouncycastle.asn1.DEREncodablegetValue()

        return oriValue;
    
public org.bouncycastle.asn1.DERObjecttoASN1Object()
Produce an object suitable for an ASN1OutputStream.
OtherRecipientInfo ::= SEQUENCE {
oriType OBJECT IDENTIFIER,
oriValue ANY DEFINED BY oriType }

        ASN1EncodableVector  v = new ASN1EncodableVector();

        v.add(oriType);
        v.add(oriValue);

        return new DERSequence(v);