mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-12-10 06:11:08 +01:00
Fix changelog and change method signature
This commit is contained in:
parent
39382c7de6
commit
50bcb6a135
4 changed files with 60 additions and 32 deletions
|
|
@ -12,21 +12,6 @@ import java.io.OutputStream;
|
|||
|
||||
/**
|
||||
* {@link OutputStream} which applies CR-LF encoding of its input data, based on the desired {@link StreamEncoding}.
|
||||
*
|
||||
*
|
||||
* If you need PGPainless to CRLF encode signed data for you, you could do the following:
|
||||
* {@code
|
||||
* <pre>
|
||||
* InputStream plaintext = ...
|
||||
* EncryptionStream signerOrEncryptor = PGPainless.signAndOrEncrypt(...);
|
||||
* CRLFGeneratorStream crlfOut = new CRLFGeneratorStream(signerOrEncryptor, streamEncoding);
|
||||
*
|
||||
* Streams.pipeAll(plaintext, crlfOut);
|
||||
* crlfOut.close;
|
||||
*
|
||||
* EncryptionResult result = signerOrEncryptor.getResult();
|
||||
* </pre>
|
||||
* }
|
||||
* This implementation originates from the Bouncy Castle library.
|
||||
*/
|
||||
public class CRLFGeneratorStream extends OutputStream {
|
||||
|
|
|
|||
|
|
@ -249,17 +249,16 @@ public final class ProducerOptions {
|
|||
|
||||
/**
|
||||
* Apply special encoding of line endings to the input data.
|
||||
* By default, this is set to <pre>false</pre>, which means that the data is not altered.
|
||||
* By default, this is disabled, which means that the data is not altered.
|
||||
*
|
||||
* Setting it to <pre>true</pre> will change the line endings to CR/LF.
|
||||
* Enabling it will change the line endings to CR/LF.
|
||||
* Note: The encoding will not be reversed when decrypting, so applying CR/LF encoding will result in
|
||||
* the identity "decrypt(encrypt(data)) == data == verify(sign(data))".
|
||||
*
|
||||
* @param applyCRLFEncoding apply crlf encoding
|
||||
* @return this
|
||||
*/
|
||||
public ProducerOptions applyCRLFEncoding(boolean applyCRLFEncoding) {
|
||||
this.applyCRLFEncoding = applyCRLFEncoding;
|
||||
public ProducerOptions applyCRLFEncoding() {
|
||||
this.applyCRLFEncoding = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue