mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-19 02:42:05 +01:00
Add documentation
This commit is contained in:
parent
bcf76e6556
commit
8b24d1ac3e
1 changed files with 13 additions and 0 deletions
|
@ -62,6 +62,7 @@ public class KeyRingBuilder implements KeyRingBuilderInterface {
|
|||
|
||||
/**
|
||||
* 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 length length in bits.
|
||||
|
@ -82,6 +83,18 @@ public class KeyRingBuilder implements KeyRingBuilderInterface {
|
|||
.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)
|
||||
throws PGPException, NoSuchAlgorithmException, NoSuchProviderException, InvalidAlgorithmParameterException {
|
||||
return withSubKey(
|
||||
|
|
Loading…
Reference in a new issue