ElGamalPublicBCPGKey
Date: 2016-06-23

org.bouncycastle.bcpg

## Class ElGamalPublicBCPGKey

- java.lang.Object
- - org.bouncycastle.bcpg.BCPGObject
  - - org.bouncycastle.bcpg.ElGamalPublicBCPGKey

- All Implemented Interfaces:
    BCPGKey, org.bouncycastle.util.Encodable

      public class ElGamalPublicBCPGKey
      extends BCPGObject
      implements BCPGKey

  base class for an ElGamal Public Key.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ElGamalPublicBCPGKey(BCPGInputStream in)`
    `ElGamalPublicBCPGKey(java.math.BigInteger p, java.math.BigInteger g, java.math.BigInteger y)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `encode(BCPGOutputStream out)`
    `byte[]` | `getEncoded()` return the standard PGP encoding of the key.
    `java.lang.String` | `getFormat()` return "PGP"
    `java.math.BigInteger` | `getG()`
    `java.math.BigInteger` | `getP()`
    `java.math.BigInteger` | `getY()`

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

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

- - ### Constructor Detail

    - #### ElGamalPublicBCPGKey

          public ElGamalPublicBCPGKey(BCPGInputStream in)
                               throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### ElGamalPublicBCPGKey

          public ElGamalPublicBCPGKey(java.math.BigInteger p,
                              java.math.BigInteger g,
                              java.math.BigInteger y)

  - ### Method Detail

    - #### getFormat

          public java.lang.String getFormat()

      return "PGP"
      Specified by:
        `getFormat` in interface `BCPGKey`
      Returns:
        "RAW" or "PGP"
      See Also:
        `BCPGKey.getFormat()`

    - #### getEncoded

          public byte[] getEncoded()

      return the standard PGP encoding of the key.
      Specified by:
        `getEncoded` in interface `BCPGKey`
      Specified by:
        `getEncoded` in interface `org.bouncycastle.util.Encodable`
      Overrides:
        `getEncoded` in class `BCPGObject`
      Returns:
        byte[]
      See Also:
        `BCPGKey.getEncoded()`

    - #### getP

          public java.math.BigInteger getP()

    - #### getG

          public java.math.BigInteger getG()

    - #### getY

          public java.math.BigInteger getY()

    - #### encode

          public void encode(BCPGOutputStream out)
                      throws java.io.IOException

      Specified by:
        `encode` in class `BCPGObject`
      Throws:
        `java.io.IOException`