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 612dcd50..b5baee83 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 @@ -311,6 +311,16 @@ public class EncryptionOptions { return this; } + /** + * Return
true
iff the user specified at least one encryption method, + *
false
otherwise. + * + * @return encryption methods is not empty + */ + public boolean hasEncryptionMethod() { + return !encryptionMethods.isEmpty(); + } + public interface EncryptionKeySelector { List selectEncryptionSubkeys(List encryptionCapableKeys); }