diff --git a/pgpainless-core/src/test/java/org/pgpainless/key/generation/GenerateKeyTest.java b/pgpainless-core/src/test/java/org/pgpainless/key/generation/GenerateKeyTest.java index 9bc3dcdd..affeac68 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/key/generation/GenerateKeyTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/key/generation/GenerateKeyTest.java @@ -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" +