-
Notifications
You must be signed in to change notification settings - Fork 33
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
Feature/argon2 contexts secret and associated data #86
Conversation
BTW, is there a reason for the current java target and source version 1.6? |
I don't know why but there seems to be an issue with the mac Github checks. EDIT: Seems to be a temporary issue. All checks after the last commit passed. |
Signed-off-by: Frederik Enste <frederik@fenste.de>
Wow, thanks for that contribution! I'm gonna take a look and test it. Regarding to Java 1.6: That was done to support Android, afaik they need 1.6 bytecode. |
Should I revert it to 1.6 in this case or will you do it as part of your review? Just FYI: Android uses 1.6 bytecode by default but most developers (incl. Google) suggest setting target and source compatibility to at least 1.8 in order to support all API features. |
argon2-jvm-nolibs/src/main/java/de/mkammerer/argon2/Argon2Version.java
Outdated
Show resolved
Hide resolved
argon2-jvm-nolibs/src/main/java/de/mkammerer/argon2/BaseArgon2.java
Outdated
Show resolved
Hide resolved
argon2-jvm-nolibs/src/main/java/de/mkammerer/argon2/BaseArgon2.java
Outdated
Show resolved
Hide resolved
argon2-jvm-nolibs/src/main/java/de/mkammerer/argon2/jna/Argon2Library.java
Outdated
Show resolved
Hide resolved
argon2-jvm-nolibs/src/main/java/de/mkammerer/argon2/jna/Argon2Library.java
Show resolved
Hide resolved
argon2-jvm-nolibs/src/main/java/de/mkammerer/argon2/jna/Argon2_version.java
Outdated
Show resolved
Hide resolved
I would prefer to stay on 1.6 just to be on the safe side. What's the problem with 1.6? I added some comments to your changes, please review. And thanks again for your contribution, it's great! |
- Reverted Java source and target back to 1.6 - Fixed swapped Library method javadoc - Added comment to context parallelism - Changed the hashLenght check - Renamed Argon2Version enum
Thanks for the review. I've adjusted the things we discussed in the conversations. Let me also give you some praise for your dedicated work. |
Thank you! I've merged it into |
I've added some advanced hash and verify methods to support argon2's secret and associated data.
I needed this for one of my projects and also saw issue #83.
Added:
Argon2_context
Structure
Class as the representation of itsC struct
.Argon2_version
as a better representation of its C counterpart.argon2*_ctx(argon2_context *context);
methods toArgon2Library
class.rawHashAdvanced
andverifyAdvanced
methods toArgon2Advanced
because theargon2*_ctx(argon2_context *context);
methods do not encode the hash.callLibraryContext
andcallLibrarayVerifyContext
methods toBaseArgon2
,Argon2i
,Argon2d
, andArgon2id
to support the new native library calls.BaseArgon2
.Modified:
gradle
wouldn't compile the project otherwise.Argon2Version
to fit the newArgon2_version
JnaUint32
class.Testing:
As this is one of my first real Github contributions feedback is much appreciated.