Use openssl_random_pseudo_bytes to generate hash.

The current 'state' hash can be inferred.
We should use openssl_random_pseudo_bytes in order to use secure hash.