Package org.pgpainless.key.protection
Class UnprotectedKeysProtector
- java.lang.Object
-
- org.pgpainless.key.protection.UnprotectedKeysProtector
-
- All Implemented Interfaces:
SecretKeyRingProtector
public class UnprotectedKeysProtector extends java.lang.Object implements SecretKeyRingProtector
Implementation of theSecretKeyRingProtectorwhich assumes that all handled keys are not password protected.
-
-
Constructor Summary
Constructors Constructor Description UnprotectedKeysProtector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.openpgp.operator.PBESecretKeyDecryptorgetDecryptor(java.lang.Long keyId)Return a decryptor for the key of idkeyId.org.bouncycastle.openpgp.operator.PBESecretKeyEncryptorgetEncryptor(java.lang.Long keyId)Return an encryptor for the key of idkeyId.
-
-
-
Method Detail
-
getDecryptor
@Nullable public org.bouncycastle.openpgp.operator.PBESecretKeyDecryptor getDecryptor(java.lang.Long keyId)
Description copied from interface:SecretKeyRingProtectorReturn a decryptor for the key of idkeyId. This method returns null if the key is unprotected.- Specified by:
getDecryptorin interfaceSecretKeyRingProtector- Parameters:
keyId- id of the key- Returns:
- decryptor for the key
-
getEncryptor
@Nullable public org.bouncycastle.openpgp.operator.PBESecretKeyEncryptor getEncryptor(java.lang.Long keyId)
Description copied from interface:SecretKeyRingProtectorReturn an encryptor for the key of idkeyId. This method returns null if the key is unprotected.- Specified by:
getEncryptorin interfaceSecretKeyRingProtector- Parameters:
keyId- id of the key- Returns:
- encryptor for the key
-
-