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
Insecure
SecureRandom which relies on PlatformDependent.threadLocalRandom() for random number
generation.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final java.security.SecureRandomprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static java.security.SecureRandomcurrent()byte[]generateSeed(int numBytes) java.lang.StringbooleanvoidnextBytes(byte[] bytes) doublefloatdoubleintnextInt()intnextInt(int n) longnextLong()private static java.util.Randomrandom()voidsetSeed(byte[] seed) voidsetSeed(long seed) Methods inherited from class java.security.SecureRandom
getInstance, getInstance, getInstance, getInstanceStrong, getProvider, getSeed, nextMethods inherited from class java.util.Random
doubles, doubles, doubles, doubles, ints, ints, ints, ints, longs, longs, longs, longsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
INSTANCE
private static final java.security.SecureRandom INSTANCE
-
-
Constructor Details
-
ThreadLocalInsecureRandom
private ThreadLocalInsecureRandom()
-
-
Method Details
-
current
static java.security.SecureRandom current() -
getAlgorithm
public java.lang.String getAlgorithm()- Overrides:
getAlgorithmin classjava.security.SecureRandom
-
setSeed
public void setSeed(byte[] seed) - Overrides:
setSeedin classjava.security.SecureRandom
-
setSeed
public void setSeed(long seed) - Overrides:
setSeedin classjava.security.SecureRandom
-
nextBytes
public void nextBytes(byte[] bytes) - Overrides:
nextBytesin classjava.security.SecureRandom
-
generateSeed
public byte[] generateSeed(int numBytes) - Overrides:
generateSeedin classjava.security.SecureRandom
-
nextInt
public int nextInt()- Overrides:
nextIntin classjava.util.Random
-
nextInt
public int nextInt(int n) - Overrides:
nextIntin classjava.util.Random
-
nextBoolean
public boolean nextBoolean()- Overrides:
nextBooleanin classjava.util.Random
-
nextLong
public long nextLong()- Overrides:
nextLongin classjava.util.Random
-
nextFloat
public float nextFloat()- Overrides:
nextFloatin classjava.util.Random
-
nextDouble
public double nextDouble()- Overrides:
nextDoublein classjava.util.Random
-
nextGaussian
public double nextGaussian()- Overrides:
nextGaussianin classjava.util.Random
-
random
private static java.util.Random random()
-