-
Notifications
You must be signed in to change notification settings - Fork 123
Expose algorithm
field on PublicKey
#281
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems reasonable to me. AIUI this is a capability callers had before #205
My code on the older version of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to add it as a function on PublicKey
instead, then mut
access doesn't allow you to generate invalid configurations.
Also, I wonder whether it makes sense to additionally expose the PublicKeyData
trait to the public (I don't like APIs that require you to import a trait, ideally the functions are available both through traits and inherent functions, unless it is a lot of API surface that's covered). Maybe that's a separate discussion though.
Sounds reasonable to me.
I like this direction less personally. I think this trait is a bit awkward (but have a hard time articulating why). I think exposing it in the existing API will make it harder to smooth out any rough edges. |
2c631bc
to
843bd7f
Compare
@est31 / @cpu, I changed to a method on One small discrepancy I just noticed while adding this to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
alg
field on PublicKey
algorithm
field on PublicKey
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Fixes #280.