protected function _random($bytes) {
		if (is_readable('/dev/urandom')) {
			$stream = fopen('/dev/urandom', 'rb');
			$result = fread($stream, $bytes);

			fclose($stream);
			return $result;
		}
		if (function_exists('mcrypt_create_iv')) {
			return mcrypt_create_iv($bytes, MCRYPT_DEV_RANDOM);
		}
		throw new Exception("No source for generating a cryptographically secure seed found.");
	}
protected function _random($bytes) {
		if (is_readable('/dev/urandom')) {
			$stream = fopen('/dev/urandom', 'rb');
			$result = fread($stream, $bytes);

			fclose($stream);
			return $result;
		}
		if (function_exists('mcrypt_create_iv')) {
			return mcrypt_create_iv($bytes, MCRYPT_DEV_RANDOM);
		}
		throw new Exception("No source for generating a cryptographically secure seed found.");
	}
protected function _random ( $ bytes ) { if ( is_readable ( '/dev/urandom' ) ) { $ stream = fopen ( '/dev/urandom' , 'rb' ) ; $ result = fread ( $ stream , $ bytes ) ; fclose ( $ stream ) ; return $ result ; } if ( function_exists ( 'mcrypt_create_iv' ) ) { return mcrypt_create_iv ( $ bytes , MCRYPT_DEV_RANDOM ) ; } throw new Exception ( "No source for generating a cryptographically secure seed found." ) ; }
Generates a cryptographically secure sequence of bytes.

@param integer $bytes Number of bytes to return.
@return string
Generates a cryptographically secure sequence of bytes .