|
Uncommons Maths API (Version 1.2.3) |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.uncommons.maths.random.SecureRandomSeedGenerator
public class SecureRandomSeedGenerator
SeedGenerator
implementation that uses Java's bundled
SecureRandom
RNG to generate random seed data.
The advantage of using SecureRandom for seeding but not as the primary RNG is that we can use it to seed RNGs that are much faster than SecureRandom.
This is the only seeding strategy that is guaranteed to work on all
platforms and therefore is provided as a fall-back option should
none of the other provided SeedGenerator
implementations be
useable.
Constructor Summary | |
---|---|
SecureRandomSeedGenerator()
|
Method Summary | |
---|---|
byte[] |
generateSeed(int length)
Generate a seed value for a random number generator. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SecureRandomSeedGenerator()
Method Detail |
---|
public byte[] generateSeed(int length) throws SeedException
generateSeed
in interface SeedGenerator
length
- The length of the seed to generate (in bytes).
SeedException
- If a seed cannot be generated for any reason.public String toString()
toString
in class Object
|
Uncommons Maths API (Version 1.2.3) |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |