org.bouncycastle.crypto.prng

Class DigestRandomGenerator

public class DigestRandomGenerator extends Object implements RandomGenerator

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
voidaddSeedMaterial(byte[] inSeed)
voidaddSeedMaterial(long rSeed)
voidnextBytes(byte[] bytes)
voidnextBytes(byte[] bytes, int start, int len)

Constructor Detail

DigestRandomGenerator

public DigestRandomGenerator(Digest digest)

Method Detail

addSeedMaterial

public void addSeedMaterial(byte[] inSeed)

addSeedMaterial

public void addSeedMaterial(long rSeed)

nextBytes

public void nextBytes(byte[] bytes)

nextBytes

public void nextBytes(byte[] bytes, int start, int len)