shopping-list/public_html/php/hash.php
2022-02-03 21:35:18 +01:00

13 lines
180 B
PHP

<?php
function hash_password($pass, $salt)
{
return hash("sha512", "$pass$salt");
}
function create_salt(int $length = 32)
{
return bin2hex(random_bytes($length));
}
?>