【发布时间】:2014-09-15 11:04:58
【问题描述】:
所以我有这个函数 login 包含一个数组,该数组获取 email 和 password 的值,我在另一个中使用 sha512 加密了密码功能,但似乎有问题,当我厌倦了输入密码时,我厌倦了修改我的代码,尽管它没有显示错误。我认为问题出在数据库中。我正在使用带有 5.6.16 数据库服务器的 xampp 1.8.3 .. 我是 codeigniter 的新手,所以请救救我..提前谢谢你.....
public function login(){
$user = $this->get_by(array(
'email' => $this->input->post('email'),
'password' => $this->hash($this->input->post('password')),
), TRUE);
}
public function hash($string){
return hash('sha512', $string . config_item('encryption_key'));
}
【问题讨论】:
标签: codeigniter sha512