You are here

public static function secureCookieBasic::get_secret in Secure Cookie Data 7.2

Returns the secret that is used as a key for the HMAC.

Return value

string The secret to be used as a key for the HMAC.

1 call to secureCookieBasic::get_secret()
secureCookieBasic::set_hmac in ./secure_cookie_data.class.inc
Generates the ciphered hash for the given data, algorithm and secret key.

File

./secure_cookie_data.class.inc, line 63
secure_cookie.class.inc @author António P. P. Almeida <appa@perusio.net> @date Wed Dec 21 03:17:53 2011

Class

secureCookieBasic

Code

public static function get_secret() {

  // Check to see if the the drupal_hash_salt is defined: Which is always
  // for a Drupal site. The class can be used outside of a Drupal context
  // nevertheless.
  return function_exists('drupal_get_hash_salt') ? sprintf('%sXYX%s', static::$__secret, drupal_get_hash_salt()) : static::$__secret;
}