-
Notifications
You must be signed in to change notification settings - Fork 28
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
Throw error in blake2b hashing when size is unreasonable. #62
Conversation
Codecov Report
@@ Coverage Diff @@
## master #62 +/- ##
=========================================
+ Coverage 97.7% 97.7% +<.01%
=========================================
Files 17 17
Lines 784 786 +2
Branches 2 2
=========================================
+ Hits 766 768 +2
Misses 16 16
Partials 2 2
Continue to review full report at Codecov.
|
src/caesium/crypto/generichash.clj
Outdated
(b/call! blake2b buf msg key)) | ||
buf)) | ||
(if-not (zero? | ||
(if (or salt personal) |
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'd be a little happier if this was factored out into a let to clarify that it's the result of calling blake2b, I think the nesting makes it tricky to read.
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.
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 great modulo the style comment I mentioned :)
Looks great, thanks! |
Relates to: #12.