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:
parent
888073b604
commit
03f13ee4a7
3 changed files with 103 additions and 11 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue