Class FipsAES.KeyGenerator

All Implemented Interfaces:
SymmetricKeyGenerator<SymmetricSecretKey>
Enclosing class:
FipsAES

public static final class FipsAES.KeyGenerator extends FipsSymmetricKeyGenerator<SymmetricSecretKey>
AES key generator.
  • Constructor Details

    • KeyGenerator

      public KeyGenerator(int keySizeInBits, SecureRandom random)
      Constructor to generate a general purpose AES key.
      Parameters:
      keySizeInBits - size of the key in bits.
      random - secure random to use in key construction.
    • KeyGenerator

      public KeyGenerator(FipsParameters parameterSet, int keySizeInBits, SecureRandom random)
      Constructor to generate a specific purpose AES key for an algorithm in a particular parameter set.
      Parameters:
      parameterSet - FIPS algorithm key is for,
      keySizeInBits - size of the key in bits.
      random - secure random to use in key construction.
  • Method Details

    • generateKey

      public SymmetricSecretKey generateKey()
      Generate a key,
      Returns:
      an AES key.