Closed saro0h closed 9 years ago
Relying on specific encoding rules is dangerous and is not recommended.
Can you explain me why please?
The API is designed to store the salt in the return (which it does). Therefore, there's no legitimate reason to make encoding of the salt a documented and reliable process.
I'd even go so far as to say using custom salts is the problem (there's really no reason to not let it generate a salt for you). It's something I strongly wish I would have left out of the implementation (the ability to specify a custom salt).
Hi,
I'm doing the password encoding command in Symfony. Here is the output of travis here : https://travis-ci.org/symfony/symfony/builds/53964672
I can see that the encoding of the password is not the same as PHP is doing.
The salt used is :
AZERTYUIOPOfghjklytrert,yuiolnbcxdfghjkytrfghjk
. The coma is a problem as in your script you encode the the salt in base_64 if it does not match this regex => https://github.com/ircmaxell/password_compat/blob/master/lib/password.php#L98I changed my test by removing this coma, but, I guess it's not okay that the lib doesn't work like PHP does.
Thank you in advance for your help