我想在MySQL中存储哈希密码,我正在使用PHP:
<?php
$salt = '!£$%^&*()#';
$username = 'abc';
$password = '123';
$hash = hash('sha1', $username . $salt . $password, true);
?>
Run Code Online (Sandbox Code Playgroud)
hash()中的true参数将返回值作为原始二进制数据.但我不明白这究竟意味着什么.如何正确存储在MySQL中?