drupal_get_private_key

Versions
mediamosa-21
drupal_get_private_key()

Ensure the private key variable used to generate tokens is set.

Return value

The private key.

▾ 2 functions call drupal_get_private_key()

drupal_get_token in includes/common.inc
Generate a token based on $value, the current user session and private key.
_update_process_fetch_task in modules/update/update.fetch.inc
Process a task to fetch available update data for a single project.

Code

includes/common.inc, line 4245

<?php
function drupal_get_private_key() {
  if (!($key = variable_get('drupal_private_key', 0))) {
    $key = md5(drupal_random_bytes(64));
    variable_set('drupal_private_key', $key);
  }
  return $key;
}
?>