Ham*_*sha 3 php sha password-hash
我使用sha1加密来加密我的密码,但我遇到了问题.对于某些用户,登录无效.
我的代码,(注册时)
// all validation is done here
$password = sha1($_POST['password']);
// inserting data is here
Run Code Online (Sandbox Code Playgroud)
在登录我的查询是
$email = $_POST['email'];
$password = sha1($_POST['password']);
select * from users where email = $email and password = $password and status = 1 and deleted = 0;
Run Code Online (Sandbox Code Playgroud)
用户面临密码问题之一,
IM $$人
难道我做错了什么.
请帮我.