@Deprecated public class PRNG extends Object implements VertxContextPRNG
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
stop seeding the PRNG
|
boolean |
nextBoolean()
Deprecated.
Returns a secure random boolean
|
void |
nextBytes(byte[] bytes)
Deprecated.
Fills the given byte array with random bytes.
|
double |
nextDouble()
Deprecated.
Returns a secure random double value.
|
float |
nextFloat()
Deprecated.
Returns a secure random float value.
|
double |
nextGaussian()
Deprecated.
Returns a secure random double value.
|
int |
nextInt()
Deprecated.
Returns a secure random int
|
int |
nextInt(int bound)
Deprecated.
Returns a secure random int, between 0 (inclusive) and the specified bound (exclusive).
|
long |
nextLong()
Deprecated.
Returns a secure random long
|
String |
nextString(int length)
Deprecated.
Returns a Base64 url encoded String of random data with the given length.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
current, current, current
public PRNG(Vertx vertx)
public void close()
VertxContextPRNG
close
in interface VertxContextPRNG
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.public boolean nextBoolean()
VertxContextPRNG
nextBoolean
in interface VertxContextPRNG
public long nextLong()
VertxContextPRNG
nextLong
in interface VertxContextPRNG
public float nextFloat()
VertxContextPRNG
nextFloat
in interface VertxContextPRNG
public double nextDouble()
VertxContextPRNG
nextDouble
in interface VertxContextPRNG
public double nextGaussian()
VertxContextPRNG
nextGaussian
in interface VertxContextPRNG
public String nextString(int length)
VertxContextPRNG
nextString
in interface VertxContextPRNG
length
- the desired string length before Base64 encoding.Copyright © 2024 Eclipse. All rights reserved.