public interface Random
| Modifier and Type | Method and Description |
|---|---|
byte[] |
nonce(int size)
Get a random number of bytes to use in a nonce.
|
byte[] |
randomBytesBuf(int size)
Get a random number of bytes.
|
byte[] |
randomBytesDeterministic(int size,
byte[] seed)
Get deterministically random bytes given a seed.
|
long |
randomBytesRandom()
Return a unsigned int byte 0 and 0xffffffff included.
|
long |
randomBytesUniform(int upperBound)
Returns an unpredictable value between 0 and upperBound (excluded).
|
long randomBytesRandom()
long randomBytesUniform(int upperBound)
upperBound - byte[] randomBytesBuf(int size)
size - The length of the byte array to return.byte[] randomBytesDeterministic(int size,
byte[] seed)
size - Size of byte array to return.seed - Seed to provide.byte[] nonce(int size)
size - The size of the byte array to return.randomBytesBuf(int)