public class PRNG extends Object implements VertxContextPRNG
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
nextBytes(byte[] bytes)
Fills the given byte array with random bytes.
|
int |
nextInt()
Returns a secure random int
|
int |
nextInt(int bound)
Returns a secure random int, between 0 (inclusive) and the specified bound (exclusive).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
current, current, current, nextString
public PRNG(Vertx vertx)
public void close()
public void nextBytes(byte[] bytes)
VertxContextPRNG
nextBytes
in interface VertxContextPRNG
bytes
- a byte array.public int nextInt()
VertxContextPRNG
nextInt
in interface VertxContextPRNG
public int nextInt(int bound)
VertxContextPRNG
nextInt
in interface VertxContextPRNG
bound
- the upper bound (exclusive), which must be positive.Copyright © 2023 Eclipse. All rights reserved.