|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.clazzes.optional.sec.DigestRandomGenerator
public class DigestRandomGenerator
Random generation based on the digest with counter. Calling addSeedMaterial will always increase the entropy of the hash.
Internal access to the digest is synchronized so a single one of these can be shared.
Constructor Summary | |
---|---|
DigestRandomGenerator(Digest digest)
|
Method Summary | |
---|---|
void |
addSeedMaterial(byte[] inSeed)
Add more seed material to the generator. |
void |
addSeedMaterial(long rSeed)
Add more seed material to the generator. |
void |
nextBytes(byte[] bytes)
Fill bytes with random values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DigestRandomGenerator(Digest digest)
Method Detail |
---|
public void addSeedMaterial(byte[] inSeed)
SeededRandomGenerator
addSeedMaterial
in interface SeededRandomGenerator
inSeed
- a byte array to be mixed into the generator's state.public void addSeedMaterial(long rSeed)
SeededRandomGenerator
addSeedMaterial
in interface SeededRandomGenerator
rSeed
- a long value to be mixed into the generator's state.public void nextBytes(byte[] bytes)
RandomGenerator
nextBytes
in interface RandomGenerator
bytes
- byte array to be filled.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |