I'm using Random Bytes to create a hash in PHP:
<?php
class Hash
{
public static function make($string, $salt = '')
{
return hash('sha256', $string . $salt);
}
public static function salt($length)
{
return random_bytes($length);
}
public static function unique()
{
return self::make(uniqid());
}
}
?>
But I get this as result:
|i����� ͦ��S��7�j�)8ce��|i����� ͦ��S��7�j�)8ce��
So how what is this and how can I fix this problem?