Package org.jboss.netty.handler.ssl.util
Class ThreadLocalInsecureRandom
java.lang.Object
java.util.Random
java.security.SecureRandom
org.jboss.netty.handler.ssl.util.ThreadLocalInsecureRandom
- All Implemented Interfaces:
Serializable
Insecure
SecureRandom
which relies on ThreadLocalRandom
for random number generation.-
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, getInstanceStrong, getProvider, getSeed, next
-
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) - 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()- Overrides:
nextBoolean
in classRandom
-
nextLong
public long nextLong() -
nextFloat
public float nextFloat() -
nextDouble
public double nextDouble()- Overrides:
nextDouble
in classRandom
-
nextGaussian
public double nextGaussian()- Overrides:
nextGaussian
in classRandom
-
random
-