- var_dump: documentation ( source)
<?php
function dumb_hash(string $arbitrary, bool $raw_binary = false): string
{
$h = sodium_crypto_shorthash($arbitrary, 'SoatokDreamseekr');
if ($raw_binary) {
return $h;
}
return sodium_bin2hex($h);
}
var_dump(
dumb_hash('Stormi the Folf'),
dumb_hash('Diffuse Moose')
);