mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-26 21:07:58 +01:00
Add modernKeyRing(userId) shortcut method
This commit is contained in:
parent
c510551f16
commit
51baa0e5cb
1 changed files with 15 additions and 0 deletions
|
@ -188,6 +188,21 @@ public final class KeyRingTemplates {
|
|||
return builder.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a modern PGP key ring consisting of an ed25519 EdDSA primary key which is used to certify
|
||||
* an X25519 XDH encryption subkey and an ed25519 EdDSA signing key.
|
||||
*
|
||||
* @param userId primary user id
|
||||
* @return key ring
|
||||
*
|
||||
* @throws InvalidAlgorithmParameterException in case of invalid key generation parameters
|
||||
* @throws NoSuchAlgorithmException in case of missing algorithm implementation in the crypto provider
|
||||
* @throws PGPException in case of an OpenPGP related error
|
||||
*/
|
||||
public PGPSecretKeyRing modernKeyRing(String userId) throws PGPException, InvalidAlgorithmParameterException, NoSuchAlgorithmException {
|
||||
return modernKeyRing(userId, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a modern PGP key ring consisting of an ed25519 EdDSA primary key which is used to certify
|
||||
* an X25519 XDH encryption subkey and an ed25519 EdDSA signing key.
|
||||
|
|
Loading…
Reference in a new issue