FileDocCategorySizeDatePackage
DSAParameter.javaAPI DocAzureus 3.0.3.41992Tue Jun 08 05:12:56 BST 2004org.bouncycastle.asn1.x509

DSAParameter

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

Fields Summary
org.bouncycastle.asn1.DERInteger
p
org.bouncycastle.asn1.DERInteger
q
org.bouncycastle.asn1.DERInteger
g
Constructors Summary
public DSAParameter(BigInteger p, BigInteger q, BigInteger g)

        this.p = new DERInteger(p);
        this.q = new DERInteger(q);
        this.g = new DERInteger(g);
    
public DSAParameter(org.bouncycastle.asn1.ASN1Sequence seq)

        Enumeration     e = seq.getObjects();

        p = (DERInteger)e.nextElement();
        q = (DERInteger)e.nextElement();
        g = (DERInteger)e.nextElement();
    
Methods Summary
public org.bouncycastle.asn1.DERObjectgetDERObject()

        ASN1EncodableVector  v = new ASN1EncodableVector();

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

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

        return g.getPositiveValue();
    
public static org.bouncycastle.asn1.x509.DSAParametergetInstance(org.bouncycastle.asn1.ASN1TaggedObject obj, boolean explicit)

        return getInstance(ASN1Sequence.getInstance(obj, explicit));
    
public static org.bouncycastle.asn1.x509.DSAParametergetInstance(java.lang.Object obj)

        if(obj == null || obj instanceof DSAParameter) 
        {
            return (DSAParameter)obj;
        }
        
        if(obj instanceof ASN1Sequence) 
        {
            return new DSAParameter((ASN1Sequence)obj);
        }
        
        throw new IllegalArgumentException("Invalid DSAParameter: " + obj.getClass().getName());
    
public java.math.BigIntegergetP()

        return p.getPositiveValue();
    
public java.math.BigIntegergetQ()

        return q.getPositiveValue();