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

DHParameter

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

Fields Summary
org.bouncycastle.asn1.DERInteger
p
org.bouncycastle.asn1.DERInteger
g
org.bouncycastle.asn1.DERInteger
l
Constructors Summary
public DHParameter(BigInteger p, BigInteger g, int l)

        this.p = new DERInteger(p);
        this.g = new DERInteger(g);

        if (l != 0)
        {
            this.l = new DERInteger(l);
        }
        else
        {
            this.l = null;
        }
    
public DHParameter(org.bouncycastle.asn1.ASN1Sequence seq)

        Enumeration     e = seq.getObjects();

        p = (DERInteger)e.nextElement();
        g = (DERInteger)e.nextElement();

        if (e.hasMoreElements())
        {
            l = (DERInteger)e.nextElement();
        }
        else
        {
            l = null;
        }
    
Methods Summary
public org.bouncycastle.asn1.DERObjectgetDERObject()

        ASN1EncodableVector  v = new ASN1EncodableVector();

        v.add(p);
        v.add(g);

        if (this.getL() != null)
        {
            v.add(l);
        }

        return new DERSequence(v);
    
public java.math.BigIntegergetG()

        return g.getPositiveValue();
    
public java.math.BigIntegergetL()

        if (l == null)
        {
            return null;
        }

        return l.getPositiveValue();
    
public java.math.BigIntegergetP()

        return p.getPositiveValue();