Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography 1.20
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.bouncycastle.openpgp
Class PGPPublicKey

    java.lang.Object
      |
      +--org.bouncycastle.openpgp.PGPPublicKey

All Implemented Interfaces:
  PublicKeyAlgorithmTags

public class PGPPublicKey
extends java.lang.Object
implements PublicKeyAlgorithmTags

general class to handle a PGP public key object.

Field Summary

Fields inherited from interface org.bouncycastle.bcpg.PublicKeyAlgorithmTags
`DIFFIE_HELLMAN, DSA, EC, ECDSA, ELGAMAL_ENCRYPT, ELGAMAL_GENERAL, RSA_ENCRYPT, RSA_GENERAL, RSA_SIGN`

Method Summary
`void` | `encode(java.io.OutputStream outStream)`
`int` | `getAlgorithm()` Return the algorithm code associated with the public key.
`byte[]` | `getEncoded()`
`java.security.PublicKey` | `getKey(java.lang.String provider)` Return the public key contained in the object.
`long` | `getKeyID()` Return the keyID associated with the public key.
`java.util.Iterator` | `getSignaturesForID(java.lang.String id)`
`java.util.Iterator` | `getUserIDs()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getKeyID

    public long getKeyID()

  Return the keyID associated with the public key.

  Returns:
    long

### getAlgorithm

    public int getAlgorithm()

  Return the algorithm code associated with the public key.

  Returns:
    int

### getKey

    public java.security.PublicKey getKey(java.lang.String provider)
                                   throws PGPException,
                                          java.security.NoSuchProviderException

  Return the public key contained in the object.

  Parameters:
    `provider` - provider to construct the key for.
  Returns:
    PublicKey
  Throws:
    `PGPException`
    `java.security.NoSuchProviderException`

### getUserIDs

    public java.util.Iterator getUserIDs()

### getSignaturesForID

    public java.util.Iterator getSignaturesForID(java.lang.String id)

### getEncoded

    public byte[] getEncoded()
                      throws java.io.IOException

    `java.io.IOException`

### encode

    public void encode(java.io.OutputStream outStream)
                throws java.io.IOException

    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography 1.20
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD