You are here

public static function secureCookieBasic::validate in Secure Cookie Data 7

Same name and namespace in other branches
  1. 7.2 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.

$data: The data that constitutes the message to be digested.

Return value

string The message digest.

1 call to secureCookieBasic::validate()
secure_cookie_data_get in ./secure_cookie_data.module
Obtain the data stored in a secure cookie.

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

secureCookieBasic
@file secure_cookie.class.inc @author António P. P. Almeida <appa@perusio.net> @date Wed Dec 21 03:17:53 2011

Code

public static function validate($hmac, $data = NULL) {
  return self::create($data) == $hmac;
}