net.i2p.crypto.elgamal

## Class KeyPairGenerator

- java.lang.Object
- - java.security.KeyPairGeneratorSpi
  - - net.i2p.crypto.elgamal.KeyPairGenerator

-     public final class KeyPairGenerator
      extends KeyPairGeneratorSpi

  Modified from eddsa Only supported strength is 2048

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `KeyPairGenerator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `KeyPair` | `generateKeyPair()`
    `void` | `initialize(AlgorithmParameterSpec params, SecureRandom random)`
    `void` | `initialize(int strength, SecureRandom random)`

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

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

- - ### Constructor Detail

    - #### KeyPairGenerator

          public KeyPairGenerator()

  - ### Method Detail

    - #### generateKeyPair

          public KeyPair generateKeyPair()

      Specified by:
        `generateKeyPair` in class `KeyPairGeneratorSpi`

    - #### initialize

          public void initialize(AlgorithmParameterSpec params,
                                 SecureRandom random)
                          throws InvalidAlgorithmParameterException

      Overrides:
        `initialize` in class `KeyPairGeneratorSpi`
      Parameters:
        `random` - ignored
      Throws:
        `InvalidAlgorithmParameterException`

    - #### initialize

          public void initialize(int strength,
                                 SecureRandom random)

      Specified by:
        `initialize` in class `KeyPairGeneratorSpi`
      Parameters:
        `strength` - must be 2048
        `random` - ignored