From 558e6693e6fe1cc85aa43eab4eef84c514116a90 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Wed, 3 May 2023 14:23:25 +0200 Subject: [PATCH] Add javadoc --- .../encryption_signing/EncryptionOptions.java | 15 +++++++++++++++ 1 file changed, 15 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 8c69761c..248a8ce4 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 @@ -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); }