A word for the unwary, the KeyID for a OpenPGP public key is calculated from a hash that includes the time of creation, if you pass a different date to the constructor below with the same public private key pair the KeyID will not be the same as for previous generations of the key, so ideally you only want to do this once.
| Modifier and Type | Field and Description |
|---|---|
| protected PGPPrivateKey | |
| protected PGPPublicKey |
| Access | Constructor and Description |
|---|---|
| public | PGPKeyPair(PGPPublicKey
the public key pub, PGPPrivateKey the private key priv)Create a key pair from a PGPPrivateKey and a PGPPublicKey. |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public PGPKeyPair | |
| public long | |
| public KeyIdentifier | |
| public PGPPrivateKey | |
| public PGPPublicKey |
| priv | back to summary |
|---|---|
| protected PGPPrivateKey priv | |
| pub | back to summary |
|---|---|
| protected PGPPublicKey pub | |
| PGPKeyPair | back to summary |
|---|---|
| public PGPKeyPair(PGPPublicKey pub, PGPPrivateKey priv) Create a key pair from a PGPPrivateKey and a PGPPublicKey.
| |
| PGPKeyPair | back to summary |
|---|---|
| protected PGPKeyPair() | |
| asSubkey | back to summary |
|---|---|
| public PGPKeyPair asSubkey(KeyFingerPrintCalculator fingerPrintCalculator) throws PGPException | |
| getKeyID | back to summary |
|---|---|
| public long getKeyID() Return the keyID associated with this key pair.
| |
| getKeyIdentifier | back to summary |
|---|---|
| public KeyIdentifier getKeyIdentifier() Return the
| |
| getPrivateKey | back to summary |
|---|---|
| public PGPPrivateKey getPrivateKey() | |
| getPublicKey | back to summary |
|---|---|
| public PGPPublicKey getPublicKey() | |