public static class FipsDRBG.Base extends FipsParameters
Modifier and Type | Method and Description |
---|---|
FipsDRBG.Builder |
fromDefaultEntropy()
Return a builder using an EntropySourceProvider based on the default SecureRandom with
predictionResistant set to false.
|
FipsDRBG.Builder |
fromEntropySource(EntropySourceProvider entropySourceProvider)
Create a builder which makes creates the SecureRandom objects from a specified entropy source provider.
|
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.
|
getAlgorithm
public FipsDRBG.Builder fromDefaultEntropy()
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 FipsDRBG.Builder fromEntropySource(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
- a source of entropy.predictionResistant
- true if this entropySource is prediction resistant, false otherwise.public FipsDRBG.Builder fromEntropySource(EntropySourceProvider entropySourceProvider)
Note: If this method is used any calls to setSeed() in the resulting SecureRandom will be ignored.
entropySourceProvider
- a provider of EntropySource objects.