lithium\util\StringDeprecated::random()

public static method
Replaced by `lithium\security\Random::generate()`.

Generates random bytes for use in UUIDs and password salts, using (when available) a cryptographically strong random number generator.

Parameters

  • integer $bytes

    The number of random bytes to generate.

  • array $options

Returns

string

Returns a string of random bytes.

Source

	public static function random($bytes, array $options = []) {
		$message  = "lithium\util\String::random() has been deprecated in favor of ";
		$message .= "lithium\security\Random::generate().";
		trigger_error($message, E_USER_DEPRECATED);
		return Random::generate($bytes, $options);
	}