public static function secureCookieBasic::validate in Secure Cookie Data 7.2
Same name and namespace in other branches
- 7 secure_cookie_data.class.inc \secureCookieBasic::validate()
Verifies the message digest for the given data, algorithm and secret key.
Parameters
$hmac string: The message digest that is going to be verified against the data.
object $data: The data that constitutes the message to be digested.
Return value
boolean TRUE if it validates, FALSE if not.
1 call to secureCookieBasic::validate()
- secureCookieBasic::get in ./
secure_cookie_data.class.inc - Getter for the class.
File
- ./
secure_cookie_data.class.inc, line 95 - 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 validate($hmac, $data = NULL) {
return self::set_hmac(json_encode($data)) === $hmac;
}