Package org.bouncycastle.crypto.fips
Class FipsDRBG.Base
- java.lang.Object
-
- org.bouncycastle.crypto.fips.FipsParameters
-
- org.bouncycastle.crypto.fips.FipsDRBG.Base
-
- All Implemented Interfaces:
Parameters
- Enclosing class:
- FipsDRBG
public static class FipsDRBG.Base extends FipsParameters
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FipsDRBG.Builder
fromDefaultEntropy()
Return a builder using an EntropySourceProvider based on the default SecureRandom with predictionResistant set to false.FipsDRBG.Builder
fromEntropySource(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.FipsDRBG.Builder
fromEntropySource(EntropySourceProvider entropySourceProvider)
Create a builder which makes creates the SecureRandom objects from a specified entropy source provider.-
Methods inherited from class org.bouncycastle.crypto.fips.FipsParameters
getAlgorithm
-
-
-
-
Method Detail
-
fromDefaultEntropy
public FipsDRBG.Builder 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
public FipsDRBG.Builder fromEntropySource(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.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 source of entropy.predictionResistant
- true if this entropySource is prediction resistant, false otherwise.- Returns:
- a new Builder instance.
-
fromEntropySource
public FipsDRBG.Builder fromEntropySource(EntropySourceProvider entropySourceProvider)
Create a builder which makes creates the SecureRandom objects from a specified entropy source provider.Note: If this method 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.
-
-