1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-23 04:42:06 +01:00

GenerateKeyTest: Print public key instead of secret key

This commit is contained in:
Paul Schaub 2021-03-18 21:33:39 +01:00
parent 8c97b6ead1
commit 883c819536
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -48,15 +48,15 @@ public class GenerateKeyTest {
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
ArmoredOutputStream armor = ArmoredOutputStreamFactory.get(bytes);
secretKeys.encode(armor);
publicKeys.encode(armor);
armor.close();
String publicKey = new String(bytes.toByteArray());
String publicKey = bytes.toString();
bytes = new ByteArrayOutputStream();
armor = ArmoredOutputStreamFactory.get(bytes);
secretKeys.encode(armor);
armor.close();
String privateKey = new String(bytes.toByteArray());
String privateKey = bytes.toString();
LOGGER.log(Level.INFO, String.format("Generated random fresh EC key ring.\n" +
"User-ID: %s\n" +