From 5746985bb77e145db569b4c6f9ab9f5ffeaec8ce Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Mon, 29 Aug 2022 12:46:36 +0200 Subject: [PATCH] Add EncryptionOptions.get() factory method --- .../encryption_signing/EncryptionOptions.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionOptions.java b/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionOptions.java index 2a75ee4e..6d2ca642 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionOptions.java +++ b/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionOptions.java @@ -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}.