removed mt_rand

replaced with openssl_random_pseudo_bytes for more security.