You are here

function _nodeviewcount_create_token in Node view count 7.3

Create the token used to verify an URL.

Parameters

array $data: URL components (strings) that need to be verified.

Return value

string The token.

2 calls to _nodeviewcount_create_token()
nodeviewcount_count_node_view_ajax in includes/pages/nodeviewcount.pages.inc
Page callback: Add node view ajax.
nodeviewcount_node_view in ./nodeviewcount.module
Implements hook_node_view().

File

./nodeviewcount.module, line 189
Defines necessery hooks.

Code

function _nodeviewcount_create_token(array $data) {
  $key = variable_get('nodeviewcount_secret_key', 'SECRET_KEY');
  $data = implode(':', $data);
  return drupal_hmac_base64($data, $key);
}