final class ThreadLocalInsecureRandom
extends java.security.SecureRandom
SecureRandom which relies on PlatformDependent.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, nextprivate 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.SecureRandompublic void setSeed(byte[] seed)
setSeed in class java.security.SecureRandompublic void setSeed(long seed)
setSeed in class java.security.SecureRandompublic void nextBytes(byte[] bytes)
nextBytes in class java.security.SecureRandompublic byte[] generateSeed(int numBytes)
generateSeed in class java.security.SecureRandompublic int nextInt()
nextInt in class java.util.Randompublic int nextInt(int n)
nextInt in class java.util.Randompublic boolean nextBoolean()
nextBoolean in class java.util.Randompublic long nextLong()
nextLong in class java.util.Randompublic float nextFloat()
nextFloat in class java.util.Randompublic double nextDouble()
nextDouble in class java.util.Randompublic double nextGaussian()
nextGaussian in class java.util.Randomprivate static java.util.Random random()