From 99496f80f5ae3190a5e50668e01a908d8339e140 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Tue, 4 Jan 2022 17:20:38 +0100 Subject: [PATCH] Hex decode data in OpenPgpV4Fingerprint constructor --- .../src/main/java/org/pgpainless/key/OpenPgpV4Fingerprint.java | 2 +- .../signature/subpackets/SignatureSubpacketsUtil.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 b5b3d4a7..2605eb0c 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/key/OpenPgpV4Fingerprint.java +++ b/pgpainless-core/src/main/java/org/pgpainless/key/OpenPgpV4Fingerprint.java @@ -72,7 +72,7 @@ public class OpenPgpV4Fingerprint extends OpenPgpFingerprint { } public OpenPgpV4Fingerprint(@Nonnull byte[] bytes) { - super(bytes); + super(Hex.encode(bytes)); } public OpenPgpV4Fingerprint(@Nonnull PGPPublicKey key) { diff --git a/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpacketsUtil.java b/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpacketsUtil.java index b73ddde7..960d5256 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpacketsUtil.java +++ b/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpacketsUtil.java @@ -89,7 +89,7 @@ public final class SignatureSubpacketsUtil { OpenPgpFingerprint fingerprint = null; if (subpacket.getKeyVersion() == 4) { - fingerprint = new OpenPgpV4Fingerprint(Hex.encode(subpacket.getFingerprint())); + fingerprint = new OpenPgpV4Fingerprint(subpacket.getFingerprint()); } return fingerprint;