Code example for BigInteger

Methods: intValue

0
	public static CryptoKey read(InputStream i) throws IOException, CryptFormatException {
		return new DSAPublicKey(i);
	} 
 
	public int keyId() { 
		return y.intValue();
	} 
 
	@Override 
	public String toLongString() {
		return "y=" + HexUtil.biToHex(y);
	} 
 
	// this won't correctly read the output from writeAsField 
	//public static CryptoKey readFromField(DSAGroup group, String field) { 
	//    BigInteger y=Util.byteArrayToMPI(Util.hexToBytes(field)); 
	//    return new DSAPublicKey(group, y); 
	//} 
	@Override 
	public byte[] asBytes() { 
		byte[] groupBytes = getGroup().asBytes();