openssl_random_pseudo_bytes

Example

 string openssl_random_pseudo_bytes ( int $length [, bool &$crypto_strong ] ) 

Description

Generates a string of pseudo-random bytes, with the number of bytes determined by the length parameter. It also indicates if a cryptographically strong algorithm was used to produce the pseudo-random bytes, and does this via the optional crypto_strong parameter. It's rare for this to be FALSE, but some systems may be broken or old.

Return Values

Returns the generated string of bytes on success, or FALSE on failure.