org.bouncycastle.openpgp
Class PGPPublicKeyRing
java.lang.Object
|
+--org.bouncycastle.openpgp.PGPPublicKeyRing
- public class PGPPublicKeyRing
- extends java.lang.Object
general class to hold a collection of PGP Public Keys.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PGPPublicKeyRing
public PGPPublicKeyRing(byte[] encoding)
throws java.io.IOException
PGPPublicKeyRing
public PGPPublicKeyRing(java.io.InputStream in)
throws java.io.IOException
getPublicKey
public PGPPublicKey getPublicKey()
- Return the first public key in the ring.
- Returns:
- PGPPublicKey
getPublicKey
public PGPPublicKey getPublicKey(long keyID)
throws PGPException,
java.security.NoSuchProviderException
- Return the public key refered to by the passed in keyID if it
is present.
- Parameters:
keyID
- - Returns:
- PGPPublicKey
- Throws:
PGPException
- java.security.NoSuchProviderException
-
getPublicKeys
public java.util.Iterator getPublicKeys()
- Return an iterator containing all the public keys.
- Returns:
- Iterator
getEncoded
public byte[] getEncoded()
throws java.io.IOException
encode
public void encode(java.io.OutputStream outStream)
throws java.io.IOException