yii2 - crypt() fallback for old hash salts in PHP7 -
i working on upgrading code base php-7 , i'm having trouble old users have salt format not compatible des. idea authenticate user , transform hash salt new format blowfish compatible new crypt.
the problem comes when try use 'crypt()' old salt in order authenticate user before changing salt, following error:
crypt(): supplied salt not valid des. possible bug in provided salt format.
is there way use crypt (or alternative function) other algorithms can use old format salt?
for people have same problem, solved using password_verify underneath uses password_hashwhich supports existing password hashes joachim suggested.
Comments
Post a Comment