Skip to content
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

verify with secret #314

Open
z33ky opened this issue Mar 17, 2021 · 0 comments
Open

verify with secret #314

z33ky opened this issue Mar 17, 2021 · 0 comments

Comments

@z33ky
Copy link

z33ky commented Mar 17, 2021

It seems to me that the API is missing a way to ergonomically verify an encoded hash that was used a secret.
argon2_verify() has no parameter for the secret, so argon2_verify_ctx() has to be used. decode_string() is not exposed however, so one has to reimplement decoding oneself, which is not ideal.

I propose either adding decode_string() to the public interface, or adding an argon2_verify_with_secret(const char *encoded, [...] const void *secret, const size_t secretlen, [...]) for this use case.
Having decode_string() be part of the public interface may also be useful for other use cases (dealing with ad), so I think that would be preferable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant