-
Notifications
You must be signed in to change notification settings - Fork 708
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
implement Clone for LessSafeKey #1175
Conversation
47a236b
to
38fd833
Compare
Codecov Report
@@ Coverage Diff @@
## main #1175 +/- ##
==========================================
+ Coverage 93.13% 93.17% +0.04%
==========================================
Files 116 116
Lines 18081 18127 +46
Branches 195 195
==========================================
+ Hits 16839 16890 +51
+ Misses 1208 1202 -6
- Partials 34 35 +1
Continue to review full report at Codecov.
|
Please review PR #1185 and see if rebasing this on top of that PR will simplify this. AFAICT it will. |
Yes it looks like the manual impl isn't needed on that branch. Everything is just |
Thanks! I have now merged that refactoring. If you rebase this on top of main, and add a test that encrypting some arbitrary data with the original key results in the same output as encrypting the same arbitrary data with a clone of the key (with the same nonce), then I'll prioritize merging this and ensure it is included in the next release. |
@oconnor663 Are you still interested in this? I'm preparing a new release that could include this if you rebase it onto main. |
38fd833
to
3a7e084
Compare
Done! Thanks for the reminder. |
3a7e084
to
9b80f5c
Compare
Addressed the comments above. Let me know what you think about the |
@oconnor663 If you can rebase this and address the comment above, then I think we're good to go and I'll be able to include this in the next release. |
OpeningKey and SealingKey intentionally avoid implementing Clone, because they're attached to a fixed nonce sequence that should be unique. LessSafeKey isn't attached to a nonce sequence, though, and making it Clone lets callers avoid repeating key setup work.
9b80f5c
to
2f29364
Compare
I've rebased the branch and removed the extra commit that was just fixing a warning. Not sure about the codecov message. If I put a It looks like some repo settings have changed, and the CI run for the rebased branch won't start until I get some new permissions. Let me know if you need anything from me for that. |
I started the CI run. Recently GitHub started requiring manual approval for the first PR from a new contributor to a repo, to prevent cryptocurrency mining and other abuse of GitHub Actions. |
Oof. As they say about nice things, and why we cannot have them... |
Thanks! Merged. |
Great! Thanks for all the feedback. |
OpeningKey and SealingKey intentionally avoid implementing Copy and
Clone, because they're attached to a fixed nonce sequence that should be
unique. LessSafeKey isn't attached to a nonce sequence, though, and
making it Clone lets callers avoid repeating key setup work.
Coming from #1158 (comment).