Exemplo n.º 1
0
 public function check($password, $hash, $salt = NULL, $iterations = NULL)
 {
     // $2a$ (4) 00 (2) $ (1) <salt> (22)
     preg_match('/^\\$2a\\$(\\d{2})\\$(.{22})/D', $hash, $matches);
     // Extract the iterations and salt from the hash
     list($_, $iterations, $salt) = $matches;
     return parent::check($password, $hash, $salt, $iterations);
 }
Exemplo n.º 2
0
 public function check($password, $hash, $salt = NULL, $iterations = NULL)
 {
     // Legacy auth stores the salt in the hash
     $salt = Auth::instance()->find_salt($hash);
     return parent::check($password, $hash, $salt, 1);
 }