1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-18 02:12:06 +01:00

Add javadoc

This commit is contained in:
Paul Schaub 2023-05-03 14:23:25 +02:00
parent 344f1fc67c
commit 558e6693e6

View file

@ -211,10 +211,25 @@ public class EncryptionOptions {
return addAsRecipient(key, encryptionKeySelectionStrategy, false); 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) { public EncryptionOptions addHiddenRecipient(@Nonnull PGPPublicKeyRing key) {
return addHiddenRecipient(key, encryptionKeySelector); 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) { public EncryptionOptions addHiddenRecipient(PGPPublicKeyRing key, EncryptionKeySelector encryptionKeySelectionStrategy) {
return addAsRecipient(key, encryptionKeySelectionStrategy, true); return addAsRecipient(key, encryptionKeySelectionStrategy, true);
} }