1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-19 02:42:05 +01:00

Add documentation

This commit is contained in:
Paul Schaub 2018-06-28 15:08:30 +02:00
parent bcf76e6556
commit 8b24d1ac3e
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -62,6 +62,7 @@ public class KeyRingBuilder implements KeyRingBuilderInterface {
/** /**
* Creates a simple RSA KeyPair of length {@code length} with user-id {@code userId}. * Creates a simple RSA KeyPair of length {@code length} with user-id {@code userId}.
* The KeyPair consists of a single RSA master key which is used for signing, encryption and certification.
* *
* @param userId user id. * @param userId user id.
* @param length length in bits. * @param length length in bits.
@ -82,6 +83,18 @@ public class KeyRingBuilder implements KeyRingBuilderInterface {
.build(); .build();
} }
/**
* Creates a key ring consisting of an ECDSA master key and an ECDH sub-key.
* The ECDSA master key is used for signing messages and certifying the sub key.
* The ECDH sub-key is used for encryption of messages.
*
* @param userId user-id
* @return {@link PGPSecretKeyRing} containing the key pairs.
* @throws PGPException
* @throws NoSuchAlgorithmException
* @throws NoSuchProviderException
* @throws InvalidAlgorithmParameterException
*/
public PGPSecretKeyRing simpleEcKeyRing(String userId) public PGPSecretKeyRing simpleEcKeyRing(String userId)
throws PGPException, NoSuchAlgorithmException, NoSuchProviderException, InvalidAlgorithmParameterException { throws PGPException, NoSuchAlgorithmException, NoSuchProviderException, InvalidAlgorithmParameterException {
return withSubKey( return withSubKey(