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 Details

    • fromDefaultEntropy

      public FipsDRBG.Builder fromDefaultEntropy()
      Return a builder using an EntropySourceProvider based on SecureRandom.getInstanceStrong().

      Any SecureRandom created from a builder constructed like this will ignore SecureRandom.setSeed() as the underlying seed generator will.

      Returns:
      a new Builder instance.
    • fromEntropySource

      public FipsDRBG.Builder fromEntropySource(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.