From efc0cb357b44d393a487786cbed29cb0e4dfc5f7 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Thu, 23 Jun 2022 11:47:20 +0200 Subject: [PATCH] EncryptDecryptRoundTripTest: make passphrase constant --- .../java/org/pgpainless/sop/EncryptDecryptRoundTripTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pgpainless-sop/src/test/java/org/pgpainless/sop/EncryptDecryptRoundTripTest.java b/pgpainless-sop/src/test/java/org/pgpainless/sop/EncryptDecryptRoundTripTest.java index 52db6a62..6f7e3d47 100644 --- a/pgpainless-sop/src/test/java/org/pgpainless/sop/EncryptDecryptRoundTripTest.java +++ b/pgpainless-sop/src/test/java/org/pgpainless/sop/EncryptDecryptRoundTripTest.java @@ -28,6 +28,7 @@ public class EncryptDecryptRoundTripTest { private static final Charset utf8 = Charset.forName("UTF8"); private static SOP sop; private static byte[] aliceKey; + private static final String alicePassword = "wonderland.is.c00l"; private static byte[] aliceCert; private static byte[] bobKey; private static byte[] bobCert; @@ -38,7 +39,7 @@ public class EncryptDecryptRoundTripTest { sop = new SOPImpl(); aliceKey = sop.generateKey() .userId("Alice ") - .withKeyPassword("wonderland.is.c00l") + .withKeyPassword(alicePassword) .generate() .getBytes(); aliceCert = sop.extractCert() @@ -57,7 +58,7 @@ public class EncryptDecryptRoundTripTest { public void basicRoundTripWithKey() throws IOException, SOPGPException.KeyCannotSign { byte[] encrypted = sop.encrypt() .signWith(aliceKey) - .withKeyPassword("wonderland.is.c00l") + .withKeyPassword(alicePassword) .withCert(aliceCert) .withCert(bobCert) .plaintext(message)