|
Bouncy Castle Cryptography 1.46 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bouncycastle.openpgp.PGPKeyRing
org.bouncycastle.openpgp.PGPPublicKeyRing
public class PGPPublicKeyRing
Class to hold a single master public key and its subkeys.
Often PGP keyring files consist of multiple master keys, if you are trying to process or construct one of these you should use the PGPPublicKeyRingCollection class.
Constructor Summary | |
---|---|
PGPPublicKeyRing(byte[] encoding)
|
|
PGPPublicKeyRing(java.io.InputStream in)
|
Method Summary | |
---|---|
void |
encode(java.io.OutputStream outStream)
|
byte[] |
getEncoded()
|
PGPPublicKey |
getPublicKey()
Return the first public key in the ring. |
PGPPublicKey |
getPublicKey(long keyID)
Return the public key referred to by the passed in keyID if it is present. |
java.util.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PGPPublicKeyRing(byte[] encoding) throws java.io.IOException
java.io.IOException
public PGPPublicKeyRing(java.io.InputStream in) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public PGPPublicKey getPublicKey()
public PGPPublicKey getPublicKey(long keyID)
keyID
-
public java.util.Iterator getPublicKeys()
public byte[] getEncoded() throws java.io.IOException
java.io.IOException
public void encode(java.io.OutputStream outStream) throws java.io.IOException
java.io.IOException
public static PGPPublicKeyRing insertPublicKey(PGPPublicKeyRing pubRing, PGPPublicKey pubKey)
pubRing
- the public key ring to be modifiedpubKey
- the public key to be inserted.
public static PGPPublicKeyRing removePublicKey(PGPPublicKeyRing pubRing, PGPPublicKey pubKey)
pubRing
- the public key ring to be modifiedpubKey
- the public key to be removed.
|
Bouncy Castle Cryptography 1.46 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |