Add EncryptionOptions.get() factory method

This commit is contained in:
Paul Schaub 2022-08-29 12:46:36 +02:00
parent d1001412a1
commit 5746985bb7
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
1 changed files with 13 additions and 0 deletions

View File

@ -80,6 +80,19 @@ public class EncryptionOptions {
this.purpose = purpose;
}
/**
* Factory method to create an {@link EncryptionOptions} object which will encrypt for keys
* which carry either the {@link org.pgpainless.algorithm.KeyFlag#ENCRYPT_COMMS} or
* {@link org.pgpainless.algorithm.KeyFlag#ENCRYPT_STORAGE} flag.
*
* Use this if you are not sure.
*
* @return encryption options
*/
public static EncryptionOptions get() {
return new EncryptionOptions();
}
/**
* Factory method to create an {@link EncryptionOptions} object which will encrypt for keys
* which carry the flag {@link org.pgpainless.algorithm.KeyFlag#ENCRYPT_COMMS}.