Bouncy Castle Cryptography 1.23

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.


Constructor Summary
PGPPublicKeyRingCollection(byte[] encoding)
           
PGPPublicKeyRingCollection(java.util.Collection collection)
           
PGPPublicKeyRingCollection(java.io.InputStream in)
           
 
Method Summary
 void encode(java.io.OutputStream outStream)
           
 byte[] getEncoded()
           
 java.util.Iterator getKeyRings()
          return the public key rings making up this collection.
 PGPPublicKey getPublicKey(long keyID)
          Return the PGP public key associated with the given key id.
 PGPPublicKeyRing getPublicKeyRing(long keyID)
          Return the public key ring which contains the key referred to by keyID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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
Method Detail

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

Bouncy Castle Cryptography 1.23