-
Notifications
You must be signed in to change notification settings - Fork 7
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
Crypto modern api #18
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #18 +/- ##
===========================================
- Coverage 89.94% 61.90% -28.04%
===========================================
Files 2 2
Lines 179 189 +10
Branches 13 44 +31
===========================================
- Hits 161 117 -44
- Misses 18 72 +54 ☔ View full report in Codecov by Sentry. |
647bfa6
to
ae22bea
Compare
ae22bea
to
713e745
Compare
9e268ec
to
169e9cf
Compare
169e9cf
to
f678d1e
Compare
rebar.config
Outdated
@@ -32,7 +31,7 @@ | |||
{port_env, | |||
[ | |||
{"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)", | |||
"CFLAGS", "$CFLAGS -std=c99 -O3 -g -Wall -Wextra -Wundef -Werror=undef -fPIC -I/opt/homebrew/include -I/usr/local/include"}, | |||
"CFLAGS", "$CFLAGS -std=c99 -O3 -g -Wall -Wextra -Werror -fPIC -I/opt/homebrew/include -I/usr/local/include"}, |
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 believe the homebrew path is different for ARM and Intel based macbooks, but it's anyway a bad idea to add homebrew paths in rebar.config
EVP_MD_CTX *outer; | ||
} HMAC_md_ctx; | ||
|
||
#define DECL_PBKDF2(_name, _blocksz, _hashsz, _iters_per_slot) \ |
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.
While I understand that this has changed completely, there was a useful description here. Without it, the code might be harder to understand.
This is the main rework. I initially wrote the standard functions for SHA1, and only later refactored to extract all SHA1 specifics into macro parameters, so that all other algorithms could be generated by the macro.
f678d1e
to
d7957cb
Compare
Solves #14, and also implements the SHA3 family of algorithms, which turned out to be a low hanging fruit after the API migration.