java biginteger parse string code example
Example 1: transformer un string en Biginteger java
String foo = "some text";
byte[] fooBytes = foo.getBytes();
BigInteger bi = new BigInteger(fooBytes);
Example 2: transformer un string en Biginteger java
public BigInteger toBigInteger(String foo)
{
return new BigInteger(foo.getBytes());
}
public String fromBigInteger(BigInteger bar)
{
return new String(bar.toByteArray());
}