1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-09-13 20:29:39 +02:00

OpenPgpV4Fingerprint: Support pretty print format

This commit is contained in:
Paul Schaub 2021-05-08 14:01:42 +02:00
parent 1a82e015f7
commit ec611d7c5f
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 27 additions and 1 deletions

View file

@ -95,4 +95,11 @@ public class OpenPgpV4FingerprintTest {
URI uri = new URI(null, "5448452043414B452049532041204C4945212121", null);
assertThrows(IllegalArgumentException.class, () -> 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());
}
}