Add EncryptionOptions.hasEncryptionMethod()

This commit is contained in:
Paul Schaub 2023-01-31 18:19:08 +01:00
parent 9f98e4ce37
commit 695e03f8b6
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
1 changed files with 10 additions and 0 deletions

View File

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