The remarks for the BigInteger
constructor state that you can make sure any BigInteger
created from a byte[]
is unsigned if you append a 00
byte to the end of the array before calling the constructor.
Note: the BigInteger
constructor expects the array to be in little-endian order. Keep that in mind if you expect the resulting BigInteger
to have a particular value.