mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-10 10:49:39 +02:00
replace create{Encryptor,Decryptor} methods with encryptAndOrSign,decryptAndOrVerify
This commit is contained in:
parent
accb18bd4e
commit
cc1e4601e3
6 changed files with 33 additions and 12 deletions
|
@ -76,7 +76,7 @@ Take for example a look at this delicious key:
|
|||
|
||||
Encrypting and signing data is pretty straight forward as well.
|
||||
```java
|
||||
EncryptionStream encryptor = PGPainless.createEncryptor()
|
||||
EncryptionStream encryptor = PGPainless.encryptAndOrSign()
|
||||
.onOutputStream(targetOuputStream)
|
||||
.toRecipients(publicKeyRings)
|
||||
.usingSecureAlgorithms()
|
||||
|
@ -109,7 +109,7 @@ This object will contain information like to which keys the message is encrypted
|
|||
To process incoming encrypted / signed data, just do the following:
|
||||
|
||||
```java
|
||||
DecryptionStream decryptor = PGPainless.createDecryptor()
|
||||
DecryptionStream decryptor = PGPainless.decryptAndOrVerify()
|
||||
.onInputStream(sourceInputStream) // insert encrypted data here
|
||||
.decryptWith(secretKeyDecryptor, secretKey)
|
||||
.verifyWith(trustedKeyIds, senderKeys)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue