FileDocCategorySizeDatePackage
OtherInfo.javaAPI DocAzureus 3.0.3.42349Mon Mar 20 04:56:46 GMT 2006org.bouncycastle.asn1.x9

OtherInfo

public class OtherInfo extends Object implements org.bouncycastle.asn1.DEREncodable
ANS.1 def for Diffie-Hellman key exchange OtherInfo structure. See RFC 2631, or X9.42, for further details.

Fields Summary
private KeySpecificInfo
keyInfo
private org.bouncycastle.asn1.ASN1OctetString
partyAInfo
private org.bouncycastle.asn1.ASN1OctetString
suppPubInfo
Constructors Summary
public OtherInfo(KeySpecificInfo keyInfo, org.bouncycastle.asn1.ASN1OctetString partyAInfo, org.bouncycastle.asn1.ASN1OctetString suppPubInfo)

        this.keyInfo = keyInfo;
        this.partyAInfo = partyAInfo;
        this.suppPubInfo = suppPubInfo;
    
public OtherInfo(org.bouncycastle.asn1.ASN1Sequence seq)

        Enumeration e = seq.getObjects();

        keyInfo = new KeySpecificInfo((ASN1Sequence)e.nextElement());

        while (e.hasMoreElements())
        {
            DERTaggedObject o = (DERTaggedObject)e.nextElement();

            if (o.getTagNo() == 0)
            {
                partyAInfo = (ASN1OctetString)o.getObject();
            }
            else if (o.getTagNo() == 2)
            {
                suppPubInfo = (ASN1OctetString)o.getObject();
            }
        }
    
Methods Summary
public org.bouncycastle.asn1.DERObjectgetDERObject()
Produce an object suitable for an ASN1OutputStream.
OtherInfo ::= SEQUENCE {
keyInfo KeySpecificInfo,
partyAInfo [0] OCTET STRING OPTIONAL,
suppPubInfo [2] OCTET STRING
}

        ASN1EncodableVector  v = new ASN1EncodableVector();

        v.add(keyInfo);

        if (partyAInfo != null)
        {
            v.add(new DERTaggedObject(0, partyAInfo));
        }

        v.add(new DERTaggedObject(2, suppPubInfo));

        return new DERSequence(v);
    
public KeySpecificInfogetKeyInfo()

        return keyInfo;
    
public org.bouncycastle.asn1.ASN1OctetStringgetPartyAInfo()

        return partyAInfo;
    
public org.bouncycastle.asn1.ASN1OctetStringgetSuppPubInfo()

        return suppPubInfo;