diff --git a/pgpainless-core/src/main/java/org/pgpainless/key/OpenPgpV4Fingerprint.java b/pgpainless-core/src/main/java/org/pgpainless/key/OpenPgpV4Fingerprint.java index 469f6068..93c0ada3 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/key/OpenPgpV4Fingerprint.java +++ b/pgpainless-core/src/main/java/org/pgpainless/key/OpenPgpV4Fingerprint.java @@ -22,6 +22,7 @@ import java.nio.ByteBuffer; import java.nio.charset.Charset; import javax.annotation.Nonnull; +import org.bouncycastle.openpgp.PGPKeyRing; import org.bouncycastle.openpgp.PGPPublicKey; import org.bouncycastle.openpgp.PGPPublicKeyRing; import org.bouncycastle.openpgp.PGPSecretKey; @@ -45,7 +46,7 @@ public class OpenPgpV4Fingerprint implements CharSequence, Comparable OpenPgpV4Fingerprint.fromUri(uri)); } + + @Test + public void testFromPrettyPrinted() { + String prettyPrint = "C94B 884B 9A56 7B1C FB23 6999 7DC5 BDAC BBDF BF87"; + OpenPgpV4Fingerprint fingerprint = new OpenPgpV4Fingerprint(prettyPrint); + assertEquals(prettyPrint, fingerprint.prettyPrint()); + } }