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:
parent
de706f16fd
commit
939c7230ab
1 changed files with 15 additions and 1 deletions
|
@ -15,13 +15,27 @@
|
||||||
*/
|
*/
|
||||||
package de.vanitasvitae.crypto.pgpainless.key;
|
package de.vanitasvitae.crypto.pgpainless.key;
|
||||||
|
|
||||||
|
import org.bouncycastle.openpgp.PGPException;
|
||||||
import org.bouncycastle.openpgp.operator.PBESecretKeyDecryptor;
|
import org.bouncycastle.openpgp.operator.PBESecretKeyDecryptor;
|
||||||
import org.bouncycastle.openpgp.operator.PBESecretKeyEncryptor;
|
import org.bouncycastle.openpgp.operator.PBESecretKeyEncryptor;
|
||||||
|
|
||||||
public interface SecretKeyRingProtector {
|
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);
|
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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue