final class ThreadLocalInsecureRandom
extends java.security.SecureRandom
SecureRandom
which relies on ThreadLocalRandom
for random number generation.Modifier and Type | Field and Description |
---|---|
private static java.security.SecureRandom |
INSTANCE |
private static long |
serialVersionUID |
Modifier | Constructor and Description |
---|---|
private |
ThreadLocalInsecureRandom() |
Modifier and Type | Method and Description |
---|---|
(package private) static java.security.SecureRandom |
current() |
byte[] |
generateSeed(int numBytes) |
java.lang.String |
getAlgorithm() |
boolean |
nextBoolean() |
void |
nextBytes(byte[] bytes) |
double |
nextDouble() |
float |
nextFloat() |
double |
nextGaussian() |
int |
nextInt() |
int |
nextInt(int n) |
long |
nextLong() |
private static java.util.Random |
random() |
void |
setSeed(byte[] seed) |
void |
setSeed(long seed) |
getInstance, getInstance, getInstance, getInstanceStrong, getProvider, getSeed, next
private static final long serialVersionUID
private static final java.security.SecureRandom INSTANCE
static java.security.SecureRandom current()
public java.lang.String getAlgorithm()
getAlgorithm
in class java.security.SecureRandom
public void setSeed(byte[] seed)
setSeed
in class java.security.SecureRandom
public void setSeed(long seed)
setSeed
in class java.security.SecureRandom
public void nextBytes(byte[] bytes)
nextBytes
in class java.security.SecureRandom
public byte[] generateSeed(int numBytes)
generateSeed
in class java.security.SecureRandom
public int nextInt()
nextInt
in class java.util.Random
public int nextInt(int n)
nextInt
in class java.util.Random
public boolean nextBoolean()
nextBoolean
in class java.util.Random
public long nextLong()
nextLong
in class java.util.Random
public float nextFloat()
nextFloat
in class java.util.Random
public double nextDouble()
nextDouble
in class java.util.Random
public double nextGaussian()
nextGaussian
in class java.util.Random
private static java.util.Random random()