-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve key handling #238
Comments
When you mean
Out of curiosity, why do you want to avoid additional parameters? |
Yep, that's exactly what I mean :) I've seen too much code where people just keep adding method parameters so it just gets a bit out of control which biases me against doing it this way. Doing this on the EncryptionKeys object means that it'll apply to all subsequent calls made to the PGP object without having to specify it each method call. Not sure if this is a good thing or not but maybe we'd want to set it on EncryptionKeys and then allow it to be changed at the method level. Essentially I don't know what the best solution for this is but if you've got a preferred solution feel free to put in a PR for it and I'll probably go with it :) |
Alright! I'll try the method you mentioned and see where we get from there. One more question though: currently, Does it make sense to have multiple public key rings within one |
I've been looking into it a bit more. You can pass multiple public keys/rings so you can encrypt the message for multiple recipients, right? Does this mean the user should be able to specify which key to use per key ring/recipient? |
PGP command line allows you to specify which key to use in the keyring by passing the KeyID. |
Hi @MB34 |
At the moment the
EncryptionKeys
object choses the best key for the job but it would be good to allow the user to set the key when required.This is probably best done via an extension method on
EncryptionKeys
(though I'm open to other suggestions) as I'd rather not add additional parameters into all the methods.#156
#204
#210
The text was updated successfully, but these errors were encountered: