Top Description Methods
org.bouncycastle.crypto.general

pack-priv Interface DRBG

Known Direct Implementers
org.bouncycastle.crypto.general.X931PseudoRandom, org.bouncycastle.crypto.general.ContinuousTestingPseudoRNG

Interface to SP800-90A/X9.31 deterministic random bit generators.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

number of bits generated, -1 if a reseed required.
generate
(byte[]
output array for generated bits.
output
,
byte[]
additional input to be added to the DRBG in this step.
additionalInput
,
boolean
true if a reseed should be forced, false otherwise.
predictionResistant
)

Populate a passed in array with random data.

public int

Returns:

the block size (in bits) produced by each round of the DRBG.
getBlockSize
()

Return the block size of the DRBG.

public void
reseed(byte[]
additional input to be added to the DRBG in this step.
additionalInput
)

Reseed the DRBG.

Method Detail

generateback to summary
public int generate(byte[] output, byte[] additionalInput, boolean predictionResistant)

Populate a passed in array with random data.

Parameters
output:byte[]

output array for generated bits.

additionalInput:byte[]

additional input to be added to the DRBG in this step.

predictionResistant:boolean

true if a reseed should be forced, false otherwise.

Returns:int

number of bits generated, -1 if a reseed required.

getBlockSizeback to summary
public int getBlockSize()

Return the block size of the DRBG.

Returns:int

the block size (in bits) produced by each round of the DRBG.

reseedback to summary
public void reseed(byte[] additionalInput)

Reseed the DRBG.

Parameters
additionalInput:byte[]

additional input to be added to the DRBG in this step.