Add javadoc

This commit is contained in:
Paul Schaub 2023-05-03 14:23:25 +02:00
parent 8762eeeea6
commit 68696c0032
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
1 changed files with 15 additions and 0 deletions

View File

@ -211,10 +211,25 @@ public class EncryptionOptions {
return addAsRecipient(key, encryptionKeySelectionStrategy, false);
}
/**
* Add a certificate as hidden recipient.
* The recipients key-id will be obfuscated by setting a wildcard key ID.
*
* @param key recipient key
* @return this
*/
public EncryptionOptions addHiddenRecipient(@Nonnull PGPPublicKeyRing key) {
return addHiddenRecipient(key, encryptionKeySelector);
}
/**
* Add a certificate as hidden recipient, using the provided {@link EncryptionKeySelector} to select recipient subkeys.
* The recipients key-ids will be obfuscated by setting a wildcard key ID instead.
*
* @param key recipient key
* @param encryptionKeySelectionStrategy strategy to select recipient (sub) keys.
* @return this
*/
public EncryptionOptions addHiddenRecipient(PGPPublicKeyRing key, EncryptionKeySelector encryptionKeySelectionStrategy) {
return addAsRecipient(key, encryptionKeySelectionStrategy, true);
}