From 4dac07811a2fd7bc3551402cffdef101a700c5ed Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Mon, 19 Jun 2023 11:53:15 +0200 Subject: [PATCH] Remove SecretKeyRingProtector.unlockAllKeysWith() --- CHANGELOG.md | 1 + .../key/protection/SecretKeyRingProtector.java | 18 ------------------ 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 986e0c0e..fe084f3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ SPDX-License-Identifier: CC0-1.0 - Remove unused methods from `SignatureUtils` - Encryption: Allow anonymous recipients using wildcard key-IDs - Add `SignatureSubpacketsUtil.getRegularExpressions()` +- Remove `SecretKeyRingProtector.unlockAllKeysWith()` in favor of `unlockAnyKeyWith()` - Tests, tests, tests ## 1.5.3 diff --git a/pgpainless-core/src/main/java/org/pgpainless/key/protection/SecretKeyRingProtector.java b/pgpainless-core/src/main/java/org/pgpainless/key/protection/SecretKeyRingProtector.java index d7ed5c85..7da6af41 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/key/protection/SecretKeyRingProtector.java +++ b/pgpainless-core/src/main/java/org/pgpainless/key/protection/SecretKeyRingProtector.java @@ -76,24 +76,6 @@ public interface SecretKeyRingProtector { missingPassphraseCallback); } - /** - * Use the provided passphrase to lock/unlock all keys in the provided key ring. - * - * This protector will use the provided passphrase to lock/unlock all subkeys present in the provided keys object. - * For other keys that are not present in the ring, it will return null. - * - * @param passphrase passphrase - * @param keys key ring - * @return protector - * @deprecated use {@link #unlockEachKeyWith(Passphrase, PGPSecretKeyRing)} instead. - * - * TODO: Remove in 1.2.X - */ - @Deprecated - static SecretKeyRingProtector unlockAllKeysWith(@Nonnull Passphrase passphrase, @Nonnull PGPSecretKeyRing keys) { - return unlockEachKeyWith(passphrase, keys); - } - /** * Use the provided passphrase to lock/unlock all keys in the provided key ring. *