diff --git a/pgpainless-core/src/main/kotlin/org/pgpainless/key/protection/UnlockSecretKey.kt b/pgpainless-core/src/main/kotlin/org/pgpainless/key/protection/UnlockSecretKey.kt index f83b8336..dd2f7081 100644 --- a/pgpainless-core/src/main/kotlin/org/pgpainless/key/protection/UnlockSecretKey.kt +++ b/pgpainless-core/src/main/kotlin/org/pgpainless/key/protection/UnlockSecretKey.kt @@ -111,5 +111,9 @@ class UnlockSecretKey { secretKey, SecretKeyRingProtector.unlockSingleKeyWith(passphrase, secretKey)) } } + + @JvmStatic + fun unlockSecretKey(secretKey: OpenPGPSecretKey, passphrase: Passphrase): OpenPGPPrivateKey = + unlockSecretKey(secretKey, SecretKeyRingProtector.unlockAnyKeyWith(passphrase)) } }