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

Hash Length #12

Open
ben182 opened this issue May 7, 2017 · 2 comments
Open

Hash Length #12

ben182 opened this issue May 7, 2017 · 2 comments

Comments

@ben182
Copy link

ben182 commented May 7, 2017

The hashAndEncrypt function will always return a 288 character string - is that correct?
Just for my database field.

@mabar
Copy link

mabar commented May 7, 2017

Don't rely on it. In library is used PASSWORD_DEFAULT which is bcrypt. But from php 7.2 it is argon2.
In php documentation is recommended 255 chars for password_hash. So encrypt 255 chars and output string length is what you need

@kelunik
Copy link

kelunik commented Mar 11, 2018

The password default didn't change with PHP 7.2, Argon2 has just been introduced as an additional option. Password defaults can only change to an algorithm that's been in the language for more than two years, so earliest with PHP 7.4.

It's probably best to go with a variable width field of 255 bytes encrypted, yes.

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

3 participants