php - De hash a password_hash with a cost -


if hash example password 20 times cost:

$pass1=password_hash($pass, password_default, ['cost' => 20]) 

and store in database, how can let user login on website, if password_verify() know , de hash password "once time"?

did need password_verify ($password,$storedpassword) 20 times? or there easier way it? saw password_needs_rehash, have tried use , didn't work.

i found solution, after bit of time

$pass1=password_hash($pass, password_default, ['cost' => 20]); password_verify($passwordinputbyuser, $pass1); 

so simple!


Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -