Package org.pgpainless.key.protection
Interface SecretKeyPassphraseProvider
-
- All Known Implementing Classes:
PassphraseMapKeyRingProtector
public interface SecretKeyPassphraseProviderInterface to allow the user to provide a passphrase for an encrypted OpenPGP secret key.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PassphrasegetPassphraseFor(java.lang.Long keyId)Return a passphrase for the given key.
-
-
-
Method Detail
-
getPassphraseFor
@Nullable Passphrase getPassphraseFor(java.lang.Long keyId)
Return a passphrase for the given key. If no record has been found, return null. Note: In case of an unprotected secret key, this method must may not return null, but aPassphrasewith a content of null.- Parameters:
keyId- id of the key- Returns:
- passphrase or null, if no passphrase record has been found.
-
-