我正在使用密码哈希进行注册。我需要手动创建一个 Salt,以下是我使用的代码:
$options = [
'cost' => 11,
'salt' => mcrypt_create_iv(22, MCRYPT_DEV_URANDOM)
];
$password = password_hash(
$this->input->post("confirm_password"),
PASSWORD_BCRYPT,
$options
);
当我运行此代码时,它给了我一个错误消息:
密码哈希():不推荐使用密码哈希的“盐”选项”
有什么解决办法吗?