public class PGPKeyPair
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected PGPPrivateKey |
priv |
protected PGPPublicKey |
pub |
| Modifier | Constructor and Description |
|---|---|
protected |
PGPKeyPair() |
|
PGPKeyPair(PGPPublicKey pub,
PGPPrivateKey priv)
Create a key pair from a PGPPrivateKey and a PGPPublicKey.
|
| Modifier and Type | Method and Description |
|---|---|
PGPKeyPair |
asSubkey(KeyFingerPrintCalculator fingerPrintCalculator)
Return this PGP key pair as a subkey pair.
|
long |
getKeyID()
Return the keyID associated with this key pair.
|
KeyIdentifier |
getKeyIdentifier()
Return the
KeyIdentifier associated with the public key. |
PGPPrivateKey |
getPrivateKey() |
PGPPublicKey |
getPublicKey() |
protected PGPPublicKey pub
protected PGPPrivateKey priv
public PGPKeyPair(PGPPublicKey pub, PGPPrivateKey priv)
pub - the public keypriv - the private keyprotected PGPKeyPair()
public long getKeyID()
public KeyIdentifier getKeyIdentifier()
KeyIdentifier associated with the public key.public PGPPublicKey getPublicKey()
public PGPPrivateKey getPrivateKey()
public PGPKeyPair asSubkey(KeyFingerPrintCalculator fingerPrintCalculator) throws PGPException
fingerPrintCalculator - for fingerprint calculationsPGPException - if a subkey packet cannot be constructed properly