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 SecureRandomcurrent()byte[]generateSeed(int numBytes) booleanvoidnextBytes(byte[] bytes) doublefloatdoubleintnextInt()intnextInt(int n) longnextLong()private static Randomrandom()voidsetSeed(byte[] seed) voidsetSeed(long seed) Methods inherited from class java.security.SecureRandom
getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getInstanceStrong, getParameters, getProvider, getSeed, next, nextBytes, reseed, reseed, toStringMethods inherited from class java.util.Random
doubles, doubles, doubles, doubles, from, ints, ints, ints, ints, longs, longs, longs, longsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
getAlgorithmin classSecureRandom
-
setSeed
public void setSeed(byte[] seed) - Overrides:
setSeedin classSecureRandom
-
setSeed
public void setSeed(long seed) - Overrides:
setSeedin classSecureRandom
-
nextBytes
public void nextBytes(byte[] bytes) - Specified by:
nextBytesin interfacejava.util.random.RandomGenerator- Overrides:
nextBytesin classSecureRandom
-
generateSeed
public byte[] generateSeed(int numBytes) - Overrides:
generateSeedin classSecureRandom
-
nextInt
public int nextInt() -
nextInt
public int nextInt(int n) -
nextBoolean
public boolean nextBoolean()- Specified by:
nextBooleanin interfacejava.util.random.RandomGenerator- Overrides:
nextBooleanin classRandom
-
nextLong
public long nextLong() -
nextFloat
public float nextFloat() -
nextDouble
public double nextDouble()- Specified by:
nextDoublein interfacejava.util.random.RandomGenerator- Overrides:
nextDoublein classRandom
-
nextGaussian
public double nextGaussian()- Specified by:
nextGaussianin interfacejava.util.random.RandomGenerator- Overrides:
nextGaussianin classRandom
-
random
-