Package org.bouncycastle.bcpg

## Class ECPublicBCPGKey

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

- All Implemented Interfaces:
    `BCPGKey`, `org.bouncycastle.util.Encodable`
  Direct Known Subclasses:
    `ECDHPublicBCPGKey`, `ECDSAPublicBCPGKey`, `EdDSAPublicBCPGKey`

      public abstract class ECPublicBCPGKey
      extends BCPGObject
      implements BCPGKey

  base class for an EC Public Key.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `ECPublicBCPGKey​(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, java.math.BigInteger encodedPoint)` |
    `protected` | `ECPublicBCPGKey​(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, org.bouncycastle.math.ec.ECPoint point)` |
    `protected` | `ECPublicBCPGKey​(BCPGInputStream in)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `encode​(BCPGOutputStream out)` |
    `org.bouncycastle.asn1.ASN1ObjectIdentifier` | `getCurveOID()` |
    `byte[]` | `getEncoded()` | return the standard PGP encoding of the key.
    `java.math.BigInteger` | `getEncodedPoint()` |
    `java.lang.String` | `getFormat()` | return "PGP"
    `protected static byte[]` | `readBytesOfEncodedLength​(BCPGInputStream in)` |

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

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

- - ### Constructor Detail

    - #### ECPublicBCPGKey

          protected ECPublicBCPGKey​(BCPGInputStream in)
                             throws java.io.IOException

      Parameters:
        `in` - the stream to read the packet from.
      Throws:
        `java.io.IOException`

    - #### ECPublicBCPGKey

          protected ECPublicBCPGKey​(org.bouncycastle.asn1.ASN1ObjectIdentifier oid,
                                    org.bouncycastle.math.ec.ECPoint point)

    - #### ECPublicBCPGKey

          protected ECPublicBCPGKey​(org.bouncycastle.asn1.ASN1ObjectIdentifier oid,
                                    java.math.BigInteger encodedPoint)

  - ### 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()`

    - #### encode

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

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

    - #### getEncodedPoint

          public java.math.BigInteger getEncodedPoint()

      Returns:
        point

    - #### getCurveOID

          public org.bouncycastle.asn1.ASN1ObjectIdentifier getCurveOID()

      Returns:
        oid

    - #### readBytesOfEncodedLength

          protected static byte[] readBytesOfEncodedLength​(BCPGInputStream in)
                                                    throws java.io.IOException

      Throws:
        `java.io.IOException`