org.bouncycastle.openpgp
public class PGPPublicKeyRing extends PGPKeyRing
Constructor Summary | |
---|---|
PGPPublicKeyRing(byte[] encoding) | |
PGPPublicKeyRing(InputStream in) |
Method Summary | |
---|---|
void | encode(OutputStream outStream) |
byte[] | getEncoded() |
PGPPublicKey | getPublicKey()
Return the first public key in the ring.
|
PGPPublicKey | getPublicKey(long keyID)
Return the public key refered to by the passed in keyID if it
is present.
|
Iterator | getPublicKeys()
Return an iterator containing all the public keys.
|
static PGPPublicKeyRing | insertPublicKey(PGPPublicKeyRing pubRing, PGPPublicKey pubKey)
Returns a new key ring with the public key passed in
either added or replacing an existing one.
|
static PGPPublicKeyRing | removePublicKey(PGPPublicKeyRing pubRing, PGPPublicKey pubKey)
Returns a new key ring with the public key passed in
removed from the key ring.
|
Returns: PGPPublicKey
Parameters: keyID
Returns: PGPPublicKey
Throws: PGPException
Returns: Iterator
Parameters: pubRing the public key ring to be modified pubKey the public key to be inserted.
Returns: a new keyRing
Parameters: pubRing the public key ring to be modified pubKey the public key to be removed.
Returns: a new keyRing, null if pubKey is not found.