-
Notifications
You must be signed in to change notification settings - Fork 65
lib/crypt.h: provide list of supported hash algorithms #217
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
base: develop
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #217 +/- ##
===========================================
- Coverage 90.12% 90.07% -0.05%
===========================================
Files 36 36
Lines 3767 3769 +2
Branches 739 739
===========================================
Hits 3395 3395
- Misses 238 240 +2
Partials 134 134 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thank you for your PR! After having a first look at this there are some things I'd like to change:
It would be nice if you could make these changes to your PR, and I'll review again. |
|
Perhaps, |
It makes user to parse the output of this function. IMHO, we have to do it inside this function. |
I'm fine with either way, it can be a |
3140af0 to
976b90f
Compare
I decided @vt-alt's solution is better. This evening, I'll rewrite the parsing of |
976b90f to
eee30ec
Compare
eee30ec to
a3a9553
Compare
IMHO, it might be useful for users to get a list of hashing algorithms supported by the current build. I decided to use a dictionary-like structure so that users could match the algorithm name with the corresponding prefix.
So, I think, user can iterate over this list until they get {NULL, NULL}:
altlinux/pyxcrypt@c56c9db#diff-43dec635b9590d1a1e5874610e291500ffc204b411a10313a60d099106452f47R126
But they will have to check if the linked version of libxcrypt is higher than some value (where this list was implemented). Or libxcrypt can also provide some var to check with
#ifdef