Package org.bouncycastle.util.test
Class FixedEntropySourceProvider
java.lang.Object
org.bouncycastle.util.test.FixedEntropySourceProvider
- All Implemented Interfaces:
EntropySourceProvider
An "entropy" provider which returns pre-defined data on request.
-
Constructor Summary
ConstructorsConstructorDescriptionFixedEntropySourceProvider(byte[] data, boolean isPredictionResistant) Base constructor. -
Method Summary
Modifier and TypeMethodDescriptionget(int bitsRequired) Return an EntropySource based on the data provided to this object.
-
Constructor Details
-
FixedEntropySourceProvider
public FixedEntropySourceProvider(byte[] data, boolean isPredictionResistant) Base constructor.- Parameters:
data- the data that will be returned by EntropySources created by this provider.isPredictionResistant- true if the EntropySource should be marked as prediction resistant, false otherwise.
-
-
Method Details
-
get
Return an EntropySource based on the data provided to this object.- Specified by:
getin interfaceEntropySourceProvider- Parameters:
bitsRequired- the size of the block of entropy required.- Returns:
- a new EntropySource.
-