1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-23 11:27:57 +01:00

Solve some TODOs

This commit is contained in:
Paul Schaub 2021-06-26 19:20:58 +02:00
parent f2bec7b767
commit e13a2fce73
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 4 additions and 4 deletions

View file

@ -105,7 +105,8 @@ public interface EncryptionBuilderInterface {
/**
* Encrypt for the given valid public key.
* TODO: Explain the difference between this and {@link #toRecipient(PGPPublicKeyRing, String)}.
* With this method, the recipient key is being addressed by key-id,
* so this method prioritizes algorithm preferences from the keys direct-key signature.
*
* @param key recipient key for which the message will be encrypted.
* @return api handle
@ -134,8 +135,8 @@ public interface EncryptionBuilderInterface {
/**
* Encrypt for all valid public keys in the provided collection.
* If any key is not eligible for encryption (e.g. expired, revoked...), an exception will be thrown.
* TODO: which exception?
* If any key is not eligible for encryption (e.g. expired, revoked...),
* an {@link IllegalArgumentException} will be thrown.
*
* @param keys collection of public keys
* @return api handle

View file

@ -153,7 +153,6 @@ public class BcImplementationFactory extends ImplementationFactory {
.build(passphrase.getChars());
}
// TODO: Find a better conversion method that does not depend on JcaPGPKeyPair.
private AsymmetricCipherKeyPair jceToBcKeyPair(PublicKeyAlgorithm algorithm,
KeyPair keyPair,
Date creationDate) throws PGPException {