Code example for BigInteger

Methods: signum

0
 
    public DSAGroup(BigInteger p, BigInteger q, BigInteger g) {
        this.p = p;
        this.q = q;
        this.g = g;
        if(p.signum() != 1 || q.signum() != 1 || g.signum() != 1)
        	throw new IllegalArgumentException();
    } 
 
    private DSAGroup(DSAGroup group) {
    	this.p = new NativeBigInteger(1, group.p.toByteArray());
    	this.q = new NativeBigInteger(1, group.q.toByteArray());
    	this.g = new NativeBigInteger(1, group.g.toByteArray());
	} 
 
	/** 
     * Parses a DSA Group from a string, where p, q, and g are in unsigned 
     * hex-strings, separated by a commas 
     */ 
    // see readFromField() below 
    //public static DSAGroup parse(String grp) {