我想在mysql数据库中保存哈希密码,所以我在CodeIgniter中开发了以下方法。不能在数据库中插入特殊的哈希码
private function hashing($password = '',$mail = '')
{
$hashcode = md5($password, $mail);
return sha1($hashcode,md5($hashcode.$mail));
}
用于插入:
$data = array('mail'=>$mail,'password'=>$password,'actived'=>1,'time'=>time());
$this->db->insert('users', $data);
插入正确的密码,而不是其他方面。
它会产生类似
òLmyÉZÔe+ú§3GèÇu‘
它不能被保存在MySQL database.where是什么问题?
编辑数据库归类为utf8_unicode_ci 编辑我用笨,所以它不需要mysql_real _...
向我们展示你所得到的错误。 – Daedalus 2012-07-30 23:13:29
不显示任何错误,警告或通知。 – 2012-07-30 23:18:53