public class X931SecureRandomBuilder
extends java.lang.Object
Constructor and Description |
---|
X931SecureRandomBuilder()
Basic constructor, creates a builder using an EntropySourceProvider based on the default SecureRandom with
predictionResistant set to false.
|
X931SecureRandomBuilder(EntropySourceProvider entropySourceProvider)
Create a builder which makes creates the SecureRandom objects from a specified entropy source provider.
|
X931SecureRandomBuilder(java.security.SecureRandom entropySource,
boolean predictionResistant)
Construct a builder with an EntropySourceProvider based on the passed in SecureRandom and the passed in value
for prediction resistance.
|
Modifier and Type | Method and Description |
---|---|
X931SecureRandom |
build(BlockCipher engine,
KeyParameter key,
boolean predictionResistant)
Construct a X9.31 secure random generator using the passed in engine and key.
|
X931SecureRandomBuilder |
setDateTimeVector(byte[] dateTimeVector) |
public X931SecureRandomBuilder()
Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if the default SecureRandom does for its generateSeed() call.
public X931SecureRandomBuilder(java.security.SecureRandom entropySource, boolean predictionResistant)
Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if the passed in SecureRandom does for its generateSeed() call.
entropySource
- predictionResistant
- public X931SecureRandomBuilder(EntropySourceProvider entropySourceProvider)
Note: If this constructor is used any calls to setSeed() in the resulting SecureRandom will be ignored.
entropySourceProvider
- a provider of EntropySource objects.public X931SecureRandomBuilder setDateTimeVector(byte[] dateTimeVector)
public X931SecureRandom build(BlockCipher engine, KeyParameter key, boolean predictionResistant)
engine
- a block cipher to use as the operator.key
- the block cipher key to initialise engine with.predictionResistant
- true if engine to be reseeded on each use, false otherwise.