Package org.bouncycastle.crypto.general
Class X931PRNG.Base
java.lang.Object
org.bouncycastle.crypto.general.X931PRNG.Base
- All Implemented Interfaces:
Parameters
- Enclosing class:
- X931PRNG
Base for Builder for SecureRandom objects based on the X9.31 PRNG.
-
Method Summary
Modifier and TypeMethodDescriptionReturn a builder using an EntropySourceProvider based on the default SecureRandom with predictionResistant set to false.fromEntropySource
(SecureRandom entropySource, boolean predictionResistant) Return a builder with an EntropySourceProvider based on the passed in SecureRandom and the passed in value for prediction resistance.fromEntropySource
(EntropySourceProvider entropySourceProvider) Return a builder which makes creates the SecureRandom objects from a specified entropy source provider.Return the algorithm these parameters are associated with.
-
Method Details
-
fromDefaultEntropy
Return a builder using an EntropySourceProvider based on the default SecureRandom with predictionResistant set to false.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.
- Returns:
- a new Builder instance.
-
fromEntropySource
Return a builder with an EntropySourceProvider based on the passed in SecureRandom and the passed in value for prediction resistance.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.
- Parameters:
entropySource
- a SecureRandom to use as a source of entropy for the PRNG.predictionResistant
- true if the SecureRandom should be regarded as prediction resistant, false otherwise.- Returns:
- a new builder instance.
-
fromEntropySource
Return a builder which makes creates the SecureRandom objects from a specified entropy source provider.Note: If this constructor is used any calls to setSeed() in the resulting SecureRandom will be ignored.
- Parameters:
entropySourceProvider
- a provider of EntropySource objects.- Returns:
- a new builder instance.
-
getAlgorithm
Description copied from interface:Parameters
Return the algorithm these parameters are associated with.- Specified by:
getAlgorithm
in interfaceParameters
- Returns:
- the algorithm these parameters are for.
-