1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-09-10 18:59:39 +02:00

Add StreamGeneratorWrapper which uses new PGPCanonicalizedDataGenerator if required

This commit is contained in:
Paul Schaub 2021-10-15 13:32:48 +02:00
parent 888073b604
commit 03f13ee4a7
3 changed files with 103 additions and 11 deletions

View file

@ -23,7 +23,7 @@ public class LiteralDataCRLFEncodingTest {
public void testCanonicalization() throws IOException {
PGPCanonicalizedDataGenerator generator = new PGPCanonicalizedDataGenerator();
ByteArrayOutputStream out = new ByteArrayOutputStream();
OutputStream canonicalizer = generator.open(out, PGPCanonicalizedDataGenerator.UTF8, "", new Date(), new byte[1<<9]);
OutputStream canonicalizer = generator.open(out, PGPCanonicalizedDataGenerator.UTF8, "", new Date(), new byte[1 << 9]);
ByteArrayInputStream in = new ByteArrayInputStream("Foo\nBar\n".getBytes(StandardCharsets.UTF_8));
Streams.pipeAll(in, canonicalizer);