Top Description Methods
org.bouncycastle.crypto.prng

public Interface RandomGenerator

Known Direct Implementers
org.bouncycastle.crypto.prng.ReversedWindowGenerator, org.bouncycastle.crypto.prng.VMPCRandomGenerator, org.bouncycastle.crypto.prng.DigestRandomGenerator

Generic interface for objects generating random bytes.

Method Summary

Modifier and TypeMethod and Description
public void
addSeedMaterial(byte[]
a byte array to be mixed into the generator's state.
seed
)

Add more seed material to the generator.

public void
addSeedMaterial(long
a long value to be mixed into the generator's state.
seed
)

Add more seed material to the generator.

public void
nextBytes(byte[]
byte array to be filled.
bytes
)

Fill bytes with random values.

public void
nextBytes(byte[]
byte array to be filled.
bytes
,
int
index to start filling at.
start
,
int
length of segment to fill.
len
)

Fill part of bytes with random values.

Method Detail

addSeedMaterialback to summary
public void addSeedMaterial(byte[] seed)

Add more seed material to the generator.

Parameters
seed:byte[]

a byte array to be mixed into the generator's state.

addSeedMaterialback to summary
public void addSeedMaterial(long seed)

Add more seed material to the generator.

Parameters
seed:long

a long value to be mixed into the generator's state.

nextBytesback to summary
public void nextBytes(byte[] bytes)

Fill bytes with random values.

Parameters
bytes:byte[]

byte array to be filled.

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

Fill part of bytes with random values.

Parameters
bytes:byte[]

byte array to be filled.

start:int

index to start filling at.

len:int

length of segment to fill.