public class JcaOpenPGPApi extends OpenPGPApi
OpenPGPApi using the JCA/JCE implementation of OpenPGP classes.| Constructor and Description |
|---|
JcaOpenPGPApi(java.security.Provider provider) |
JcaOpenPGPApi(java.security.Provider provider,
OpenPGPPolicy policy) |
JcaOpenPGPApi(java.security.Provider provider,
java.security.SecureRandom random) |
JcaOpenPGPApi(java.security.Provider provider,
java.security.SecureRandom random,
OpenPGPPolicy policy) |
| Modifier and Type | Method and Description |
|---|---|
OpenPGPKeyGenerator |
generateKey(int version)
Return an
OpenPGPKeyGenerator which can be used to generate OpenPGPKeys
of the given key version. |
OpenPGPKeyGenerator |
generateKey(int version,
java.util.Date creationTime)
Return an
OpenPGPKeyGenerator which can be used to generate OpenPGPKeys
of the given key version. |
OpenPGPKeyGenerator |
generateKey(int version,
java.util.Date creationTime,
boolean aeadProtection)
Return an
OpenPGPKeyGenerator which can be used to generate OpenPGPKeys
of the given key version. |
createDetachedSignature, decryptAndOrVerifyMessage, editKey, editKey, editKey, generateKey, generateKey, generateKey, getImplementation, readKeyOrCertificate, signAndOrEncryptMessage, verifyDetachedSignaturepublic JcaOpenPGPApi(java.security.Provider provider)
public JcaOpenPGPApi(java.security.Provider provider,
java.security.SecureRandom random)
public JcaOpenPGPApi(java.security.Provider provider,
OpenPGPPolicy policy)
public JcaOpenPGPApi(java.security.Provider provider,
java.security.SecureRandom random,
OpenPGPPolicy policy)
public OpenPGPKeyGenerator generateKey(int version) throws PGPException
OpenPGPApiOpenPGPKeyGenerator which can be used to generate OpenPGPKeys
of the given key version.
Valid version numbers are:
PublicKeyPacket.VERSION_4 (rfc4880)PublicKeyPacket.VERSION_6 (rfc9580)PublicKeyPacket.LIBREPGP_5 (LibrePGP; experimental)generateKey in class OpenPGPApiversion - key version numberPGPException - if the key generator cannot be set uppublic OpenPGPKeyGenerator generateKey(int version, java.util.Date creationTime) throws PGPException
OpenPGPApiOpenPGPKeyGenerator which can be used to generate OpenPGPKeys
of the given key version.
The key and signatures will have a creation time of the passed creationTime.
Valid version numbers are:
PublicKeyPacket.VERSION_4 (rfc4880)PublicKeyPacket.VERSION_6 (rfc9580)PublicKeyPacket.LIBREPGP_5 (LibrePGP; experimental)generateKey in class OpenPGPApiversion - key version numbercreationTime - key + signatures creation timePGPException - if the key generator cannot be set uppublic OpenPGPKeyGenerator generateKey(int version, java.util.Date creationTime, boolean aeadProtection) throws PGPException
OpenPGPApiOpenPGPKeyGenerator which can be used to generate OpenPGPKeys
of the given key version.
The key and signatures will have a creation time of the passed creationTime.
If aeadProtection is true, the key will use AEAD+Argon2 to protect the secret key material,
otherwise it will use salted+iterated CFB mode.
Valid version numbers are:
PublicKeyPacket.VERSION_4 (rfc4880)PublicKeyPacket.VERSION_6 (rfc9580)PublicKeyPacket.LIBREPGP_5 (LibrePGP; experimental)generateKey in class OpenPGPApicreationTime - key + signature creation timeaeadProtection - whether to use AEAD or CFB protectionPGPException - if the key generator cannot be set up