Package org.pgpainless.key.protection
Interface SecretKeyRingProtector
-
- All Known Subinterfaces:
SecretKeyRingProtectorAdapter
- All Known Implementing Classes:
PassphraseMapKeyRingProtector
,PasswordBasedSecretKeyRingProtector
,UnprotectedKeysProtector
public interface SecretKeyRingProtector
Deprecated.useSecretKeyRingProtector2
instead.Interface that is used to provide secret key ring encryptors and decryptors.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description static SecretKeyRingProtector
fromPassphraseMap(java.util.Map<java.lang.Long,Passphrase> passphraseMap)
Deprecated.org.bouncycastle.openpgp.operator.PBESecretKeyDecryptor
getDecryptor(java.lang.Long keyId)
Deprecated.Return a decryptor for the key of idkeyId
.org.bouncycastle.openpgp.operator.PBESecretKeyEncryptor
getEncryptor(java.lang.Long keyId)
Deprecated.Return an encryptor for the key of idkeyId
.static SecretKeyRingProtector
unlockAllKeysWith(Passphrase passphrase, org.bouncycastle.openpgp.PGPSecretKeyRing keys)
Deprecated.static SecretKeyRingProtector
unlockSingleKeyWith(Passphrase passphrase, org.bouncycastle.openpgp.PGPSecretKey key)
Deprecated.static SecretKeyRingProtector
unprotectedKeys()
Deprecated.
-
-
-
Method Detail
-
getDecryptor
@Nullable org.bouncycastle.openpgp.operator.PBESecretKeyDecryptor getDecryptor(java.lang.Long keyId) throws org.bouncycastle.openpgp.PGPException
Deprecated.Return a decryptor for the key of idkeyId
. This method returns null if the key is unprotected.- Parameters:
keyId
- id of the key- Returns:
- decryptor for the key
- Throws:
org.bouncycastle.openpgp.PGPException
-
getEncryptor
@Nullable org.bouncycastle.openpgp.operator.PBESecretKeyEncryptor getEncryptor(java.lang.Long keyId) throws org.bouncycastle.openpgp.PGPException
Deprecated.Return an encryptor for the key of idkeyId
. This method returns null if the key is unprotected.- Parameters:
keyId
- id of the key- Returns:
- encryptor for the key
- Throws:
org.bouncycastle.openpgp.PGPException
- if the encryptor cannot be created for some reason
-
unlockAllKeysWith
static SecretKeyRingProtector unlockAllKeysWith(Passphrase passphrase, org.bouncycastle.openpgp.PGPSecretKeyRing keys)
Deprecated.
-
unlockSingleKeyWith
static SecretKeyRingProtector unlockSingleKeyWith(Passphrase passphrase, org.bouncycastle.openpgp.PGPSecretKey key)
Deprecated.
-
unprotectedKeys
static SecretKeyRingProtector unprotectedKeys()
Deprecated.
-
fromPassphraseMap
static SecretKeyRingProtector fromPassphraseMap(java.util.Map<java.lang.Long,Passphrase> passphraseMap)
Deprecated.
-
-