ハッシュ化されたパスワードを 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'</pre>mysql データベースに保存できません。どこに問題がありますか?
edit database 照合順序は utf8_unicode_ci edit CodeIgniter を使用しているので、mysql_real_ は必要ありません...