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