Code example for BigInteger

Methods: signum

		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;
		return new DSASignature(r,s);
    public void write(OutputStream o) throws IOException {
		Util.writeMPI(r, o);
		Util.writeMPI(s, o);
Stop searching for code, let great code find you!  Add Codota to your java IDE