java.lang.Object
org.bouncycastle.crypto.KeyGenerationParameters
Direct Known Subclasses:
MLKEMKeyGenerationParameters

public class KeyGenerationParametersextends Object
The base class for parameters to key generators.
  • Field Details

    • random

      private SecureRandom random
      Source of randomness for the generation.
    • strength

      private int strength
      Strength the generated key should have.
  • Constructor Details

    • KeyGenerationParameters

      public KeyGenerationParameters(SecureRandom random, int strength)
      Initialise the generator with a source of randomness and a strength (in bits).
      Parameters:
      random - the random byte source.
      strength - the size, in bits, of the keys we want to produce.
  • Method Details

    • getRandom

      public SecureRandom getRandom()
      Return the random source associated with this generator.
      Returns:
      the generators random source.
    • getStrength

      public int getStrength()
      Return the bit strength for keys produced by this generator,
      Returns:
      the strength of the keys this generator produces (in bits).