lithium\util\StringDeprecated::hash()

public static method
Replaced by `lithium\security\Hash::calculate()`.

Uses PHP's hashing functions to create a hash of the string provided, using the options specified. The default hash algorithm is SHA-512.

Parameters

  • string $string

    The string to hash.

  • array $options

Returns

string

Returns a hashed string.

Source

	public static function hash($string, array $options = []) {
		$message  = "lithium\util\String::hash() has been deprecated in favor of ";
		$message .= "lithium\security\Hash::calculate().";
		trigger_error($message, E_USER_DEPRECATED);

		return Hash::calculate($string, $options);
	}