public final class BigIntegers
extends java.lang.Object
| Constructor and Description |
|---|
BigIntegers() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
asUnsignedByteArray(java.math.BigInteger value)
Return the passed in value as an unsigned byte array.
|
static byte[] |
asUnsignedByteArray(int length,
java.math.BigInteger value)
Return the passed in value as an unsigned byte array.
|
static java.math.BigInteger |
createRandomInRange(java.math.BigInteger min,
java.math.BigInteger max,
java.security.SecureRandom random)
Return a random BigInteger not less than 'min' and not greater than 'max'
|
static java.math.BigInteger |
fromUnsignedByteArray(byte[] buf) |
static java.math.BigInteger |
fromUnsignedByteArray(byte[] buf,
int off,
int length) |
public static byte[] asUnsignedByteArray(java.math.BigInteger value)
value - value to be converted.public static byte[] asUnsignedByteArray(int length,
java.math.BigInteger value)
value - value to be converted.public static java.math.BigInteger createRandomInRange(java.math.BigInteger min,
java.math.BigInteger max,
java.security.SecureRandom random)
min - the least value that may be generatedmax - the greatest value that may be generatedrandom - the source of randomnesspublic static java.math.BigInteger fromUnsignedByteArray(byte[] buf)
public static java.math.BigInteger fromUnsignedByteArray(byte[] buf,
int off,
int length)