1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-19 02:42:05 +01:00

Add documentation to SecretKeyRingProtector

This commit is contained in:
Paul Schaub 2018-06-27 12:33:25 +02:00
parent de706f16fd
commit 939c7230ab
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -15,13 +15,27 @@
*/
package de.vanitasvitae.crypto.pgpainless.key;
import org.bouncycastle.openpgp.PGPException;
import org.bouncycastle.openpgp.operator.PBESecretKeyDecryptor;
import org.bouncycastle.openpgp.operator.PBESecretKeyEncryptor;
public interface SecretKeyRingProtector {
/**
* Return a decryptor for the key of id {@code keyId}.
*
* @param keyId id of the key
* @return decryptor for the key
*/
PBESecretKeyDecryptor getDecryptor(Long keyId);
PBESecretKeyEncryptor getEncryptor(Long keyId);
/**
* Return an encryptor for the key of id {@code keyId}.
*
* @param keyId id of the key
* @return encryptor for the key
* @throws PGPException if the encryptor cannot be created for some reason
*/
PBESecretKeyEncryptor getEncryptor(Long keyId) throws PGPException;
}