-
Notifications
You must be signed in to change notification settings - Fork 20
Added asymmetric encrypt and decrypt #36
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
Added asymmetric encrypt and decrypt #36
Conversation
|
This PR won't pass CI until a new version of |
5c4e8b6 to
50f70ed
Compare
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.
Looks good, I'll publish the new interface version shortly.
src/core/basic_client.rs
Outdated
| let salt = match salt { | ||
| Some(salt) => Some(Zeroizing::new(salt.to_vec())), | ||
| None=> None, | ||
| }; |
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.
Now that I think of it, map should be cleaner here.
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.
Ah yes, that's nice and neat. I realise now that I could have written this as:
let salt = match salt {
Some(salt) => Some(salt.to_vec().into()),
None=> None,
};but I like map. It makes the other match in parsec much clearer!
Version |
50f70ed to
c3ec023
Compare
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.
Ah, actually, could you please add some tests? You can see the examples in src/core/testing
c3ec023 to
9ffd3f6
Compare
Signed-off-by: Samuel Bailey <[email protected]>
9ffd3f6 to
2b6e1d2
Compare
| plaintext: &[u8], | ||
| salt: Option<&[u8]>, |
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.
Nice type choice for those vectors!
|
Version |
Signed-off-by: Samuel Bailey [email protected]