0
I have a code to protect the password of the very basic database. However to log in I am always using the following:
$email = $post['email'];
$senha = md5($post['senha']);
return $this->model->Query('SELECT * FROM
usuario WHERE email = ? AND senha = ? AND deletado = ?
ORDER BY id ASC', array($email, $senha, 0));
Only md5 started to show a behavior that had not noticed before, it is changing the hash constantly in the login, something that had never happened before, perhaps due to lack of observation.
How do I make the database hash to match the login hash ?
Att.
Does the hash of the same password vary in different code calls? Are you sure it’s the same password?
– Woss
Password protection with MD5 is like protecting a whale with a Japanese fishing boat.
– Oralista de Sistemas
Anderson, yes always returns the same password 'admin' and with different hash. Renan I know it is weak, has a scheme behind that I am riding.
– Leonardo Peixe