Top Fields Constructors Methods
org.bouncycastle.jcajce.provider.drbg

pack-priv Class IncrementalEntropySourceProvider

extends Object
implements EntropySourceProvider
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.prng.EntropySourceProvider
Imports
java.security.SecureRandom, org.bouncycastle.crypto.prng.EntropySource, .EntropySourceProvider

Field Summary

Modifier and TypeField and Description
private final boolean
private final SecureRandom

Constructor Summary

AccessConstructor and Description
public
IncrementalEntropySourceProvider(SecureRandom
the SecureRandom to base EntropySource construction on.
random
,
boolean
boolean indicating if the SecureRandom is based on prediction resistant entropy or not (true if it is).
isPredictionResistant
)

Create a entropy source provider based on the passed in SecureRandom.

Method Summary

Modifier and TypeMethod and Description
public EntropySource

Returns:

an EntropySource that generates bitsRequired bits of entropy on each call to its getEntropy() method.
get
(final int
size (in bits) of entropy to be created by the provided source.
bitsRequired
)

Implements org.bouncycastle.crypto.prng.EntropySourceProvider.get.

Return an entropy source that will create bitsRequired bits of entropy on each invocation of getEntropy().
private static void
sleep(long ms)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

predictionResistantback to summary
private final boolean predictionResistant
randomback to summary
private final SecureRandom random

Constructor Detail

IncrementalEntropySourceProviderback to summary
public IncrementalEntropySourceProvider(SecureRandom random, boolean isPredictionResistant)

Create a entropy source provider based on the passed in SecureRandom.

Parameters
random:SecureRandom

the SecureRandom to base EntropySource construction on.

isPredictionResistant:boolean

boolean indicating if the SecureRandom is based on prediction resistant entropy or not (true if it is).

Method Detail

getback to summary
public EntropySource get(final int bitsRequired)

Implements org.bouncycastle.crypto.prng.EntropySourceProvider.get.

Return an entropy source that will create bitsRequired bits of entropy on each invocation of getEntropy().

Parameters
bitsRequired:int

size (in bits) of entropy to be created by the provided source.

Returns:EntropySource

an EntropySource that generates bitsRequired bits of entropy on each call to its getEntropy() method.

sleepback to summary
private static void sleep(long ms) throws InterruptedException