-
Notifications
You must be signed in to change notification settings - Fork 52
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
Full backend for scrypt with tests #31
Conversation
ba52054
to
29851b3
Compare
Codecov Report
@@ Coverage Diff @@
## develop #31 +/- ##
===========================================
+ Coverage 88.54% 88.75% +0.21%
===========================================
Files 28 30 +2
Lines 3063 3166 +103
===========================================
+ Hits 2712 2810 +98
- Misses 351 356 +5
Continue to review full report at Codecov.
|
I will look at this tomorrow, I can't do it today. |
np |
411b0f7
to
5f7223d
Compare
5f7223d
to
8e6d713
Compare
df7a44a
to
bb2a86e
Compare
bb2a86e
to
0a0825b
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.
LGTM with just one concern regarding XCRYPT_SECURE_MEMSET
(see inline comments)
} | ||
#define XCRYPT_STRCPY_OR_ABORT(dst, d_size, src) \ | ||
_xcrypt_strcpy_or_abort ((char *) dst, (const size_t) d_size, \ | ||
(const char *) src) |
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.
Why are the casts in the definition of XCRYPT_STRCPY_OR_ABORT
necessary? If it's because some callers pass char *
, some pass unsigned char *
, and some pass void *
, instead I suggest making the inline function take void *
and const void *
arguments instead, and then casting in the body of the function. That way the compiler will at least still catch const-correctness errors.
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'm going to go ahead and merge this and then tinker with XCRYPT_STRCPY_OR_ABORT
myself.
As mentioned in #27 here comes the backend for scrypt.