DESKeyGenerator (Bouncy Castle Library 1.54 API Specification)
Date: 2015-12-29

org.bouncycastle.crypto.generators

## Class DESKeyGenerator

- java.lang.Object
- - org.bouncycastle.crypto.CipherKeyGenerator
  - - org.bouncycastle.crypto.generators.DESKeyGenerator

- Direct Known Subclasses:
    DESedeKeyGenerator

      public class DESKeyGenerator
      extends CipherKeyGenerator

- - ### Field Summary

    - ### Fields inherited from class org.bouncycastle.crypto.CipherKeyGenerator

      `random, strength`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DESKeyGenerator()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `generateKey()` generate a secret key.
    `void` | `init(KeyGenerationParameters param)` initialise the key generator - if strength is set to zero the key generated will be 64 bits in size, otherwise strength can be 64 or 56 bits (if you don't count the parity bits).

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

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

- - ### Constructor Detail

    - #### DESKeyGenerator

          public DESKeyGenerator()

  - ### Method Detail

    - #### init

          public void init(KeyGenerationParameters param)

      initialise the key generator - if strength is set to zero the key generated will be 64 bits in size, otherwise strength can be 64 or 56 bits (if you don't count the parity bits).
      Overrides:
        `init` in class `CipherKeyGenerator`
      Parameters:
        `param` - the parameters to be used for key generation

    - #### generateKey

          public byte[] generateKey()

      Description copied from class: `CipherKeyGenerator`
      generate a secret key.
      Overrides:
        `generateKey` in class `CipherKeyGenerator`
      Returns:
        a byte array containing the key value.