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

Use ArmoredOutputStreamFactory to hide version string in ascii armor

Partially fixes #82
This commit is contained in:
Paul Schaub 2021-02-19 19:50:36 +01:00
parent ea89289852
commit c75a192513
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
9 changed files with 51 additions and 10 deletions

View file

@ -17,6 +17,7 @@ package org.pgpainless.sop.commands;
import org.bouncycastle.bcpg.ArmoredOutputStream;
import org.bouncycastle.util.io.Streams;
import org.pgpainless.util.ArmoredOutputStreamFactory;
import picocli.CommandLine;
import java.io.IOException;
@ -49,7 +50,7 @@ public class Armor implements Runnable {
@Override
public void run() {
try (PushbackInputStream pbIn = new PushbackInputStream(System.in); ArmoredOutputStream armoredOutputStream = new ArmoredOutputStream(System.out)) {
try (PushbackInputStream pbIn = new PushbackInputStream(System.in); ArmoredOutputStream armoredOutputStream = ArmoredOutputStreamFactory.get(System.out)) {
byte[] start = new byte[14];
int read = pbIn.read(start);
pbIn.unread(read);