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:
Serializable
,java.util.random.RandomGenerator
Insecure
SecureRandom
which relies on PlatformDependent.threadLocalRandom()
for random number
generation.-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.random.RandomGenerator
java.util.random.RandomGenerator.ArbitrarilyJumpableGenerator, java.util.random.RandomGenerator.JumpableGenerator, java.util.random.RandomGenerator.LeapableGenerator, java.util.random.RandomGenerator.SplittableGenerator, java.util.random.RandomGenerator.StreamableGenerator
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static SecureRandom
current()
byte[]
generateSeed
(int numBytes) boolean
void
nextBytes
(byte[] bytes) double
float
double
int
nextInt()
int
nextInt
(int n) long
nextLong()
private static 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
Methods inherited from class java.util.Random
doubles, doubles, doubles, doubles, from, ints, ints, ints, ints, longs, longs, longs, longs
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.random.RandomGenerator
isDeprecated, nextDouble, nextDouble, nextExponential, nextFloat, nextFloat, nextGaussian, nextInt, nextLong, nextLong
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
INSTANCE
-
-
Constructor Details
-
ThreadLocalInsecureRandom
private ThreadLocalInsecureRandom()
-
-
Method Details
-
current
-
getAlgorithm
- Overrides:
getAlgorithm
in classSecureRandom
-
setSeed
public void setSeed(byte[] seed) - Overrides:
setSeed
in classSecureRandom
-
setSeed
public void setSeed(long seed) - Overrides:
setSeed
in classSecureRandom
-
nextBytes
public void nextBytes(byte[] bytes) - Specified by:
nextBytes
in interfacejava.util.random.RandomGenerator
- Overrides:
nextBytes
in classSecureRandom
-
generateSeed
public byte[] generateSeed(int numBytes) - Overrides:
generateSeed
in classSecureRandom
-
nextInt
public int nextInt() -
nextInt
public int nextInt(int n) -
nextBoolean
public boolean nextBoolean()- Specified by:
nextBoolean
in interfacejava.util.random.RandomGenerator
- Overrides:
nextBoolean
in classRandom
-
nextLong
public long nextLong() -
nextFloat
public float nextFloat() -
nextDouble
public double nextDouble()- Specified by:
nextDouble
in interfacejava.util.random.RandomGenerator
- Overrides:
nextDouble
in classRandom
-
nextGaussian
public double nextGaussian()- Specified by:
nextGaussian
in interfacejava.util.random.RandomGenerator
- Overrides:
nextGaussian
in classRandom
-
random
-