CipherKeyGeneratorFactory (Bouncy Castle Library 1.85 API Specification)
Date: 2026-07-12

org.bouncycastle.crypto.util

## Class CipherKeyGeneratorFactory

- java.lang.Object
- - org.bouncycastle.crypto.util.CipherKeyGeneratorFactory

-     public class CipherKeyGeneratorFactory
      extends java.lang.Object

  Factory methods for generating secret key generators for symmetric ciphers.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CipherKeyGenerator` | `createKeyGenerator(ASN1ObjectIdentifier algorithm, java.security.SecureRandom random)` Create a key generator for the passed in Object Identifier.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### createKeyGenerator

          public static CipherKeyGenerator createKeyGenerator(ASN1ObjectIdentifier algorithm,
                                                              java.security.SecureRandom random)
                                                       throws java.lang.IllegalArgumentException

      Create a key generator for the passed in Object Identifier.
      Parameters:
        `algorithm` - the Object Identifier indicating the algorithn the generator is for.
        `random` - a source of random to initialise the generator with.
      Returns:
        an initialised CipherKeyGenerator.
      Throws:
        `java.lang.IllegalArgumentException` - if the algorithm cannot be identified.