Random

mt_rand function mt_rand does not generate cryptographically secure values, and should not be used for cryptographic purposes. Cryptographically secure random number generators random_int() random_bytes() openssl_random_pseudo_bytes()

Read More

openssl_random_pseudo_bytes

openssl_random_pseudo_bytes is used for cryptographical randomness where rnd() isn't suitable $salt = openssl_random_pseudo_bytes(22); $salt = substr(strtr(base64_encode($salt), array('_' => '.', '~' => '/')),0,22); //Sets length to 22 characters    

Read More