org.bouncycastle.openpgp
public class PGPSecretKeyRing extends PGPKeyRing
Constructor Summary | |
---|---|
PGPSecretKeyRing(byte[] encoding) | |
PGPSecretKeyRing(InputStream in) |
Method Summary | |
---|---|
void | encode(OutputStream outStream) |
byte[] | getEncoded() |
PGPPublicKey | getPublicKey()
Return the public key for the master key.
|
PGPSecretKey | getSecretKey()
Return the master private key.
|
PGPSecretKey | getSecretKey(long keyId) |
Iterator | getSecretKeys()
Return an iterator containing all the secret keys.
|
static PGPSecretKeyRing | insertSecretKey(PGPSecretKeyRing secRing, PGPSecretKey secKey)
Returns a new key ring with the secret key passed in either added or
replacing an existing one with the same key ID.
|
static PGPSecretKeyRing | removeSecretKey(PGPSecretKeyRing secRing, PGPSecretKey secKey)
Returns a new key ring with the secret key passed in removed from the
key ring.
|
Returns: PGPPublicKey
Returns: PGPSecretKey
Returns: Iterator
Parameters: secRing the secret key ring to be modified. secKey the secret key to be added.
Returns: a new secret key ring.
Parameters: secRing the secret key ring to be modified. secKey the secret key to be removed.
Returns: a new secret key ring, or null if secKey is not found.