1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-09-14 12:49:39 +02:00

Add shortcut SigningOptions.addSignature() method

This commit is contained in:
Paul Schaub 2022-04-04 20:18:15 +02:00
parent d0b070f0f3
commit 0bce68d6ee
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 16 additions and 1 deletions

View file

@ -55,7 +55,7 @@ public class Sign {
EncryptionStream signingStream = PGPainless.encryptAndOrSign()
.onOutputStream(signedOut)
.withOptions(ProducerOptions.sign(SigningOptions.get()
.addInlineSignature(protector, secretKey, DocumentSignatureType.CANONICAL_TEXT_DOCUMENT))
.addSignature(protector, secretKey))
);
Streams.pipeAll(messageIn, signingStream);