From 5ee17fac699893e38da38109c90c2737edeb3fa7 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Sun, 22 Nov 2020 20:49:07 +0100 Subject: [PATCH] Deprecate PGPainless's PGPKeyRing --- .../main/java/org/pgpainless/key/collection/PGPKeyRing.java | 1 + .../main/java/org/pgpainless/key/parsing/KeyRingReader.java | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/pgpainless-core/src/main/java/org/pgpainless/key/collection/PGPKeyRing.java b/pgpainless-core/src/main/java/org/pgpainless/key/collection/PGPKeyRing.java index 429733aa..5779c313 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/key/collection/PGPKeyRing.java +++ b/pgpainless-core/src/main/java/org/pgpainless/key/collection/PGPKeyRing.java @@ -23,6 +23,7 @@ import org.bouncycastle.openpgp.PGPPublicKeyRing; import org.bouncycastle.openpgp.PGPSecretKeyRing; import org.pgpainless.key.OpenPgpV4Fingerprint; +@Deprecated public class PGPKeyRing { private PGPPublicKeyRing publicKeys; diff --git a/pgpainless-core/src/main/java/org/pgpainless/key/parsing/KeyRingReader.java b/pgpainless-core/src/main/java/org/pgpainless/key/parsing/KeyRingReader.java index 919447b4..8436d96f 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/key/parsing/KeyRingReader.java +++ b/pgpainless-core/src/main/java/org/pgpainless/key/parsing/KeyRingReader.java @@ -85,10 +85,12 @@ public class KeyRingReader { return secretKeyRingCollection(asciiArmored.getBytes(UTF8)); } + @Deprecated public PGPKeyRing keyRing(@Nullable InputStream publicIn, @Nullable InputStream secretIn) throws IOException, PGPException { return readKeyRing(publicIn, secretIn); } + @Deprecated public PGPKeyRing keyRing(@Nullable byte[] publicBytes, @Nullable byte[] secretBytes) throws IOException, PGPException { return keyRing( publicBytes != null ? new ByteArrayInputStream(publicBytes) : null, @@ -96,6 +98,7 @@ public class KeyRingReader { ); } + @Deprecated public PGPKeyRing keyRing(@Nullable String asciiPublic, @Nullable String asciiSecret) throws IOException, PGPException { return keyRing( asciiPublic != null ? asciiPublic.getBytes(UTF8) : null, @@ -133,6 +136,7 @@ public class KeyRingReader { new BcKeyFingerprintCalculator()); } + @Deprecated public static PGPKeyRing readKeyRing(@Nullable InputStream publicIn, @Nullable InputStream secretIn) throws IOException, PGPException { validateStreamsNotBothNull(publicIn, secretIn); @@ -162,6 +166,7 @@ public class KeyRingReader { return null; } + @Deprecated private static PGPKeyRing asPGPKeyRing(PGPPublicKeyRing publicKeys, PGPSecretKeyRing secretKeys) { if (secretKeys == null) { return new PGPKeyRing(publicKeys);