function _fac_get_hmac_key in Fast Autocomplete 7
Gets a fac specific HMAC key.
A key is generated and stored if it doesn't exist yet.
Return value
string The current HMAC key.
1 call to _fac_get_hmac_key()
- _fac_get_role_hmac in ./
fac.module - Gets a HMAC based on account roles.
File
- ./
fac.module, line 574 - This file contains the main functions of the Fast Autocomplete module.
Code
function _fac_get_hmac_key() {
if (!($key = variable_get('fac_hmac_key', FALSE))) {
$key = drupal_random_key();
variable_set('fac_hmac_key', $key);
variable_set('fac_hmac_key_timestamp', REQUEST_TIME);
}
return $key;
}