org.bouncycastle.openpgp
Class PGPPublicKeyRingCollection
java.lang.Object
|
+--org.bouncycastle.openpgp.PGPPublicKeyRingCollection
- public class PGPPublicKeyRingCollection
- extends java.lang.Object
Often a PGP key ring file is made up of a succession of master/sub-key key rings.
If you want to read an entire public key file in one hit this is the class for you.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PGPPublicKeyRingCollection
public PGPPublicKeyRingCollection(byte[] encoding)
throws java.io.IOException,
PGPException
PGPPublicKeyRingCollection
public PGPPublicKeyRingCollection(java.io.InputStream in)
throws java.io.IOException,
PGPException
PGPPublicKeyRingCollection
public PGPPublicKeyRingCollection(java.util.Collection collection)
throws java.io.IOException,
PGPException
getKeyRings
public java.util.Iterator getKeyRings()
- return the public key rings making up this collection.
getPublicKey
public PGPPublicKey getPublicKey(long keyID)
throws PGPException
- Return the PGP public key associated with the given key id.
- Parameters:
keyID
- - Returns:
- the PGP public key
- Throws:
PGPException
-
getPublicKeyRing
public PGPPublicKeyRing getPublicKeyRing(long keyID)
throws PGPException
- Return the public key ring which contains the key referred to by keyID.
- Parameters:
keyID
- - Returns:
- the public key ring
- Throws:
PGPException
-
getEncoded
public byte[] getEncoded()
throws java.io.IOException
encode
public void encode(java.io.OutputStream outStream)
throws java.io.IOException