public class PRNG extends Object implements VertxContextPRNG
| Modifier and Type | Method and Description |
|---|---|
void |
close()
stop seeding the PRNG
|
boolean |
nextBoolean()
Returns a secure random boolean
|
void |
nextBytes(byte[] bytes)
Fills the given byte array with random bytes.
|
double |
nextDouble()
Returns a secure random double value.
|
float |
nextFloat()
Returns a secure random float value.
|
double |
nextGaussian()
Returns a secure random double value.
|
int |
nextInt()
Returns a secure random int
|
int |
nextInt(int bound)
Returns a secure random int, between 0 (inclusive) and the specified bound (exclusive).
|
long |
nextLong()
Returns a secure random long
|
String |
nextString(int length)
Returns a Base64 url encoded String of random data with the given length.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcurrent, current, currentpublic PRNG(Vertx vertx)
public void close()
VertxContextPRNGclose in interface VertxContextPRNGpublic void nextBytes(byte[] bytes)
VertxContextPRNGnextBytes in interface VertxContextPRNGbytes - a byte array.public int nextInt()
VertxContextPRNGnextInt in interface VertxContextPRNGpublic int nextInt(int bound)
VertxContextPRNGnextInt in interface VertxContextPRNGbound - the upper bound (exclusive), which must be positive.public boolean nextBoolean()
VertxContextPRNGnextBoolean in interface VertxContextPRNGpublic long nextLong()
VertxContextPRNGnextLong in interface VertxContextPRNGpublic float nextFloat()
VertxContextPRNGnextFloat in interface VertxContextPRNGpublic double nextDouble()
VertxContextPRNGnextDouble in interface VertxContextPRNGpublic double nextGaussian()
VertxContextPRNGnextGaussian in interface VertxContextPRNGpublic String nextString(int length)
VertxContextPRNGnextString in interface VertxContextPRNGlength - the desired string length before Base64 encoding.Copyright © 2021 Eclipse. All rights reserved.