小编Ham*_*sha的帖子

sha1不能使用密码加密

我使用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 $$人

难道我做错了什么.

请帮我.

php sha password-hash

3
推荐指数
1
解决办法
725
查看次数

标签 统计

password-hash ×1

php ×1

sha ×1