shopping-list/php/hash.php

14 lines
180 B
PHP
Raw Normal View History

2018-10-24 15:00:27 +02:00
<?php
function hash_password($pass, $salt)
{
return hash("sha512", "$pass$salt");
}
function create_salt(int $length = 32)
{
return bin2hex(random_bytes($length));
}
?>