Package jadex.commons.security.random
Class SecureThreadedRandom
- java.lang.Object
- 
- java.util.Random
- 
- java.security.SecureRandom
- 
- jadex.commons.security.random.SecureThreadedRandom
 
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable
 
 public class SecureThreadedRandom extends java.security.SecureRandomWrapper for quick multi-threaded PRNG access using multiple PRNGs.- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.security.SecureRandom[]prngsThe random number generators.protected intthreadingmaskMask for distributing threads.
 - 
Constructor SummaryConstructors Constructor Description SecureThreadedRandom()Creates the wrapper.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]generateSeed(int numbytes)Generates a seed value from OS source.booleannextBoolean()Wrapper method.voidnextBytes(byte[] bytes)Wrapper method.doublenextDouble()Wrapper method.floatnextFloat()Wrapper method.doublenextGaussian()Wrapper method.intnextInt()Wrapper method.intnextInt(int bound)Wrapper method.longnextLong()Wrapper method.voidsetSeed(long seed)Wrapper method.- 
Methods inherited from class java.security.SecureRandomgetAlgorithm, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getInstanceStrong, getParameters, getProvider, getSeed, next, nextBytes, reseed, reseed, setSeed, toString
 
- 
 
- 
- 
- 
Method Detail- 
nextBooleanpublic boolean nextBoolean() Wrapper method.- Overrides:
- nextBooleanin class- java.util.Random
 
 - 
nextBytespublic void nextBytes(byte[] bytes) Wrapper method.- Overrides:
- nextBytesin class- java.security.SecureRandom
 
 - 
nextDoublepublic double nextDouble() Wrapper method.- Overrides:
- nextDoublein class- java.util.Random
 
 - 
nextFloatpublic float nextFloat() Wrapper method.- Overrides:
- nextFloatin class- java.util.Random
 
 - 
nextGaussianpublic double nextGaussian() Wrapper method.- Overrides:
- nextGaussianin class- java.util.Random
 
 - 
nextIntpublic int nextInt() Wrapper method.- Overrides:
- nextIntin class- java.util.Random
 
 - 
nextIntpublic int nextInt(int bound) Wrapper method.- Overrides:
- nextIntin class- java.util.Random
 
 - 
nextLongpublic long nextLong() Wrapper method.- Overrides:
- nextLongin class- java.util.Random
 
 - 
generateSeedpublic byte[] generateSeed(int numbytes) Generates a seed value from OS source.- Overrides:
- generateSeedin class- java.security.SecureRandom
 
 - 
setSeedpublic void setSeed(long seed) Wrapper method. Warning: This is useless, included for completeness.- Overrides:
- setSeedin class- java.security.SecureRandom
 
 
- 
 
-