Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

To check password is correct or not, we need three values: password, password_hash and password_salt 

If length of password_hash = 32 (password generated on V3)

$password_hash =  md5(md5('password') . md5('password_salt'));

 

If password_hash > 32 (password generated on V4)

$password_hash = password_hash('password', PASSWORD_BCRYPT, array('cost' => 10));

To check password is correct or not:

if (password_verify('password', 'password_hash')){
 //Password correct
} else {
 //Password incorrect
}

 

 

  • No labels