public class BcPGPKeyConverter
extends java.lang.Object
| Constructor and Description |
|---|
BcPGPKeyConverter() |
| Modifier and Type | Method and Description |
|---|---|
PGPPrivateKey |
getPGPPrivateKey(PGPPublicKey pubKey,
AsymmetricKeyParameter privKey) |
PGPPublicKey |
getPGPPublicKey(int algorithm,
PGPAlgorithmParameters algorithmParameters,
AsymmetricKeyParameter pubKey,
java.util.Date time)
Create a PGPPublicKey from the passed in JCA one.
|
AsymmetricKeyParameter |
getPrivateKey(PGPPrivateKey privKey) |
AsymmetricKeyParameter |
getPublicKey(PGPPublicKey publicKey) |
public PGPPublicKey getPGPPublicKey(int algorithm, PGPAlgorithmParameters algorithmParameters, AsymmetricKeyParameter pubKey, java.util.Date time) throws PGPException
Note: the time passed in affects the value of the key's keyID, so you probably only want to do this once for a JCA key, or make sure you keep track of the time you used.
algorithm - asymmetric algorithm type representing the public key.pubKey - actual public key to associate.time - date of creation.PGPException - on key creation problem.public PGPPrivateKey getPGPPrivateKey(PGPPublicKey pubKey, AsymmetricKeyParameter privKey) throws PGPException
PGPExceptionpublic AsymmetricKeyParameter getPublicKey(PGPPublicKey publicKey) throws PGPException
PGPExceptionpublic AsymmetricKeyParameter getPrivateKey(PGPPrivateKey privKey) throws PGPException
PGPException