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

Do crypto_pwhash_str* functions have password length requirements like crypto_pwhash? #124

Closed
jprjr opened this issue Jan 24, 2021 · 1 comment

Comments

@jprjr
Copy link
Contributor

jprjr commented Jan 24, 2021

Hi there, I'm going through the documentation for crypto_pwhash_str and crypto_pwhash_str_verify.

I noticed that crypto_pwhash requires passwdlen to be between PASSWD_MIN and PASSWD_MAX. crypto_pwhash_str and crypto_pwhash_str_verify don't mention if there's a minimum/maximum length for passwdlen, I just wanted to check on that.

Happy to update the docs and open a PR

@jedisct1
Copy link
Owner

They do. But the minimum password length is 0 and the maximum is 4294967295, so there's no practical limit.

These constants are there for consistency, but are pretty much useless and application developers shouldn't worry about these limits.

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

2 participants