Top Description Fields Constructors Methods
org.bouncycastle.util.test

public Class FixedEntropySourceProvider

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

An "entropy" provider which returns pre-defined data on request.

Field Summary

Modifier and TypeField and Description
private final byte[]
private final boolean

Constructor Summary

AccessConstructor and Description
public
FixedEntropySourceProvider(byte[]
the data that will be returned by EntropySources created by this provider.
data
,
boolean
true if the EntropySource should be marked as prediction resistant, false otherwise.
isPredictionResistant
)

Base constructor.

Method Summary

Modifier and TypeMethod and Description
public EntropySource

Returns:

a new EntropySource.
get
(final int
the size of the block of entropy required.
bitsRequired
)

Implements org.bouncycastle.crypto.EntropySourceProvider.get.

Return an EntropySource based on the data provided to this object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

databack to summary
private final byte[] data
isPredictionResistantback to summary
private final boolean isPredictionResistant

Constructor Detail

FixedEntropySourceProviderback to summary
public FixedEntropySourceProvider(byte[] data, boolean isPredictionResistant)

Base constructor.

Parameters
data:byte[]

the data that will be returned by EntropySources created by this provider.

isPredictionResistant:boolean

true if the EntropySource should be marked as prediction resistant, false otherwise.

Method Detail

getback to summary
public EntropySource get(final int bitsRequired)

Implements org.bouncycastle.crypto.EntropySourceProvider.get.

Return an EntropySource based on the data provided to this object.

Parameters
bitsRequired:int

the size of the block of entropy required.

Returns:EntropySource

a new EntropySource.