...
Code Block |
---|
$key = "Chun Kang"; echo hash("crc32b", $key); |
If you want more secure method, you can add salt like below:
Code Block |
---|
function customHash($key, $salt="Genius")
{
$key += $salt;
return hash( "crc32b", $key);
}
$key = "Chun Kang";
echo customHash("crc32b", $key); |