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.
i like the wrapping, it provides us with a good abstraction. regarding some of the naming i would prefer to make it more consistent, the things related to soidumoxide::crypto::box_::
are named with an indication but the things related to sodiumoxide::crypto::sign::
are named with an additional Sign
. i would suggest the following naming:
EncrPublicKey
and SignPublicKey
EncrSecretKey
and SignSecretKey
generate_encr_key_pair()
and generate_sign_key_pair()
derive_encr_key_pair_from_seed()
and derive_sign_key_pair_from_seed()
etc
re: naming I hesitate, but I didn't really like abbreviating Now that I think about it more, I think I prefer the full
I think moving the Just to list all the alternatives:
|
i would go with (3) or (4), slightly favoring (3). |
i actually quite like (2) as
i don't mind whether it's |
that's another good suggestion. having equally long names was my original intention behind we're tackling one of the hardest problems in computer science, no easy solution :D |
I like (2) and (5) |
be85576
to
4ad0ad5
Compare
rebased. I like (5) to and it seems to make everyone happy so I'm gonna go with that. I don't understand what having the same length for the type names is important though 😄 |
the answer to that is OCD ^^ |
804ba26
to
36dcfd1
Compare
36dcfd1
to
af0e91a
Compare
@janpetschexain I addressed all your comments, and updated the tests. This is ready for another round of review. |
I think I'd prefer to remove the |
I've addressed all the comments except #392 (comment) I also:
|
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 left some remarks, but it really looks good so far! i know it's tedious work. also sorry for the sometimes unclear types in the tests, i often took the lazy way and just mocked keys where ever they are just collected but not used, this makes type inference not easy.
Ah no problem at all! And thank you for the thorough reviews, this PR is definitely looking much better than the initial version. I've addressed your last round of comment, so I'll wait for @finiteprods feedback and then squash everything. |
We'd like to implement some traits on libsodium types, but this is prevented by the orphan rule. To work around this, this commit introduce newtypes around the libsodium crypto primitives that we use in our codebase.
946bc55
to
d398c02
Compare
We'd like to implement some traits on libsodium types, but this is
prevented by the orphan rule. To work around this, this commit
introduce newtypes around the libsodium crypto primitives that we use
in our codebase.