mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-17 18:02:05 +01:00
Add section about hidden recipients to documentation
This commit is contained in:
parent
55172898a6
commit
1a38e2d31a
1 changed files with 9 additions and 0 deletions
|
@ -231,6 +231,15 @@ EncryptionOptions encOptions = EncryptionOptions.get()
|
|||
|
||||
Once again, it is possible to add multiple recipients by repeating the `addRecipient()` method call.
|
||||
|
||||
In order to prevent metadata leaks, you might want to add recipients anonymously.
|
||||
Anonymous recipients have their key-id hidden by replacing it with a wildcard.
|
||||
That way, it is not easily possible for an attacker to deduce the recipients of a message without further
|
||||
analysis of additional metadata.
|
||||
Anonymous recipients can be added like follows:
|
||||
```java
|
||||
encOptions.addHiddenRecipient(certificate);
|
||||
```
|
||||
|
||||
You can also encrypt a message to a password like this:
|
||||
```java
|
||||
encOptions.addPassphrase(Passphrase.fromPassword("sw0rdf1sh"));
|
||||
|
|
Loading…
Reference in a new issue