When creating a user, I do the following for criptografar
password:
$options = ['cost' => 12];
$encripted = password_hash($this->input->post('senha'), PASSWORD_BCRYPT, $options);
When logging in I do the following:
$result = $this->db->get('users');
$db_password = $result->row(2)->senha;
if (password_verify($senha, $db_password)) {
return true;
} else {
return false;
}
But it always falls into FALSE .
NOTE: I put a print_r
to check the value of db_password
it has hash
correct.