我正在使用坦克验证为我的网站。Codeigniter坦克验证检查用户输入的密码
我已经搜索了一个函数,当他试图更新他的配置文件时,它将检查用户是否输入了有效的密码。
我不明白如何散列用户输入的密码,以匹配数据库中的密码。
这里是我的控制器代码:
$password = $this->input->post('password');
$hasher = new PasswordHash(
$this->config->item('phpass_hash_strength', 'tank_auth'),
$this->config->item('phpass_hash_portable', 'tank_auth')
);
$hashed_password = $hasher->HashPassword($password);
$hashed_password
给了我不同的哈希每次
我不认为我应该让phpass_hash_portable
有何意见?