mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-23 12:52:07 +01:00
CachingSecretKeyRingProtector: Add addPassphrase(OpenPgpV4Fingerprint, Passphrase)
This commit is contained in:
parent
dae5288456
commit
41b8d15cec
1 changed files with 5 additions and 0 deletions
|
@ -26,6 +26,7 @@ import org.bouncycastle.openpgp.PGPKeyRing;
|
|||
import org.bouncycastle.openpgp.PGPPublicKey;
|
||||
import org.bouncycastle.openpgp.operator.PBESecretKeyDecryptor;
|
||||
import org.bouncycastle.openpgp.operator.PBESecretKeyEncryptor;
|
||||
import org.pgpainless.key.OpenPgpV4Fingerprint;
|
||||
import org.pgpainless.key.protection.passphrase_provider.SecretKeyPassphraseProvider;
|
||||
import org.pgpainless.util.Passphrase;
|
||||
|
||||
|
@ -82,6 +83,10 @@ public class CachingSecretKeyRingProtector implements SecretKeyRingProtector, Se
|
|||
addPassphrase(key.getKeyID(), passphrase);
|
||||
}
|
||||
|
||||
public void addPassphrase(@Nonnull OpenPgpV4Fingerprint fingerprint, @Nullable Passphrase passphrase) {
|
||||
addPassphrase(fingerprint.getKeyId(), passphrase);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a passphrase from the cache.
|
||||
* The passphrase will be cleared and then removed.
|
||||
|
|
Loading…
Reference in a new issue