Package io.netty.handler.ssl.util
Class ThreadLocalInsecureRandom
- java.lang.Object
-
- java.util.Random
-
- java.security.SecureRandom
-
- io.netty.handler.ssl.util.ThreadLocalInsecureRandom
-
- All Implemented Interfaces:
java.io.Serializable
final class ThreadLocalInsecureRandom extends java.security.SecureRandom
InsecureSecureRandom
which relies onPlatformDependent.threadLocalRandom()
for random number generation.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.security.SecureRandom
INSTANCE
private static long
serialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description private
ThreadLocalInsecureRandom()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
Methods inherited from class java.security.SecureRandom
getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getInstanceStrong, getParameters, getProvider, getSeed, next, nextBytes, reseed, reseed, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
INSTANCE
private static final java.security.SecureRandom INSTANCE
-
-
Method Detail
-
current
static java.security.SecureRandom current()
-
getAlgorithm
public java.lang.String getAlgorithm()
- Overrides:
getAlgorithm
in classjava.security.SecureRandom
-
setSeed
public void setSeed(byte[] seed)
- Overrides:
setSeed
in classjava.security.SecureRandom
-
setSeed
public void setSeed(long seed)
- Overrides:
setSeed
in classjava.security.SecureRandom
-
nextBytes
public void nextBytes(byte[] bytes)
- Overrides:
nextBytes
in classjava.security.SecureRandom
-
generateSeed
public byte[] generateSeed(int numBytes)
- Overrides:
generateSeed
in classjava.security.SecureRandom
-
nextInt
public int nextInt()
- Overrides:
nextInt
in classjava.util.Random
-
nextInt
public int nextInt(int n)
- Overrides:
nextInt
in classjava.util.Random
-
nextBoolean
public boolean nextBoolean()
- Overrides:
nextBoolean
in classjava.util.Random
-
nextLong
public long nextLong()
- Overrides:
nextLong
in classjava.util.Random
-
nextFloat
public float nextFloat()
- Overrides:
nextFloat
in classjava.util.Random
-
nextDouble
public double nextDouble()
- Overrides:
nextDouble
in classjava.util.Random
-
nextGaussian
public double nextGaussian()
- Overrides:
nextGaussian
in classjava.util.Random
-
random
private static java.util.Random random()
-
-