public static function secureCookieBasic::set_hmac in Secure Cookie Data 7.2
Generates the ciphered hash for the given data, algorithm and secret key.
Parameters
object|array $data: The data that constitutes the message to be digested.
Return value
string The message digest in hexadecimal.
2 calls to secureCookieBasic::set_hmac()
- secureCookieBasic::set in ./
secure_cookie_data.class.inc - Setter for the class.
- secureCookieBasic::validate in ./
secure_cookie_data.class.inc - Verifies the message digest for the given data, algorithm and secret key.
File
- ./
secure_cookie_data.class.inc, line 78 - secure_cookie.class.inc @author António P. P. Almeida <appa@perusio.net> @date Wed Dec 21 03:17:53 2011
Class
Code
public static function set_hmac($data = NULL) {
// Compute the HMAC.
return hash_hmac(static::$__algorithm, $data, hash_hmac(static::$__algorithm, $data, static::get_secret()));
}