Code example for BigInteger

Methods: signum

0
		int x=sig.indexOf(',');
		if (x <= 0)
	    	throw new NumberFormatException("DSA Signatures have two values");
		r = new NativeBigInteger(sig.substring(0,x), 16);
		s = new NativeBigInteger(sig.substring(x+1), 16);
		if(r.signum() != 1 || s.signum() != 1) throw new IllegalArgumentException();
    } 
 
    public static DSASignature read(InputStream in) throws IOException {
		BigInteger r, s;
		r=Util.readMPI(in);
		s=Util.readMPI(in);
		return new DSASignature(r,s);
    } 
 
    public void write(OutputStream o) throws IOException {
		Util.writeMPI(r, o);
		Util.writeMPI(s, o);
    } 
 
    public DSASignature(BigInteger r, BigInteger s) {