mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-23 12:52:07 +01:00
Solve some TODOs
This commit is contained in:
parent
f2bec7b767
commit
e13a2fce73
2 changed files with 4 additions and 4 deletions
|
@ -105,7 +105,8 @@ public interface EncryptionBuilderInterface {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encrypt for the given valid public key.
|
* 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.
|
* @param key recipient key for which the message will be encrypted.
|
||||||
* @return api handle
|
* @return api handle
|
||||||
|
@ -134,8 +135,8 @@ public interface EncryptionBuilderInterface {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encrypt for all valid public keys in the provided collection.
|
* 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.
|
* If any key is not eligible for encryption (e.g. expired, revoked...),
|
||||||
* TODO: which exception?
|
* an {@link IllegalArgumentException} will be thrown.
|
||||||
*
|
*
|
||||||
* @param keys collection of public keys
|
* @param keys collection of public keys
|
||||||
* @return api handle
|
* @return api handle
|
||||||
|
|
|
@ -153,7 +153,6 @@ public class BcImplementationFactory extends ImplementationFactory {
|
||||||
.build(passphrase.getChars());
|
.build(passphrase.getChars());
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Find a better conversion method that does not depend on JcaPGPKeyPair.
|
|
||||||
private AsymmetricCipherKeyPair jceToBcKeyPair(PublicKeyAlgorithm algorithm,
|
private AsymmetricCipherKeyPair jceToBcKeyPair(PublicKeyAlgorithm algorithm,
|
||||||
KeyPair keyPair,
|
KeyPair keyPair,
|
||||||
Date creationDate) throws PGPException {
|
Date creationDate) throws PGPException {
|
||||||
|
|
Loading…
Reference in a new issue