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