Use openssl_random_pseudo_bytes to generate hash.