Question : transformer un string en Biginteger java
Answered by : breakable-barracuda-0jncfurmq0n9
String foo = "some text";
byte[] fooBytes = foo.getBytes();
BigInteger bi = new BigInteger(fooBytes);
Source : https://stackoverflow.com/questions/17456390/how-to-convert-string-to-biginteger-representation-and-back-in-java | Last Update : Tue, 09 Jun 20
Question : transformer un string en Biginteger java
Answered by : breakable-barracuda-0jncfurmq0n9
public BigInteger toBigInteger(String foo)
{ return new BigInteger(foo.getBytes());
}
public String fromBigInteger(BigInteger bar)
{ return new String(bar.toByteArray());
}
Source : https://stackoverflow.com/questions/17456390/how-to-convert-string-to-biginteger-representation-and-back-in-java | Last Update : Tue, 09 Jun 20
Question : transformer un string en Biginteger java
Answered by : breakable-barracuda-0jncfurmq0n9
foo = new String(bi.toByteArray());
Source : https://stackoverflow.com/questions/17456390/how-to-convert-string-to-biginteger-representation-and-back-in-java | Last Update : Tue, 09 Jun 20