function drupal_get_hash_salt

7.x bootstrap.inc drupal_get_hash_salt()

Gets a salt useful for hardening against SQL injection.

Return value

A salt based on information in settings.php, not in the database.

8 calls to drupal_get_hash_salt()
drupal_generate_test_ua in drupal/includes/bootstrap.inc
Generates a user agent string with a HMAC and timestamp for simpletest.
drupal_get_token in drupal/includes/common.inc
Generates a token based on $value, the user session, and the private key.
drupal_valid_test_ua in drupal/includes/bootstrap.inc
Returns the test prefix if this is an internal request from SimpleTest.
file_managed_file_process in drupal/modules/file/file.module
Process function to expand the managed_file element type.
file_managed_file_value in drupal/modules/file/file.module
The #value_callback for a managed_file type element.

... See full list

File

drupal/includes/bootstrap.inc, line 2307
Functions that need to be loaded on every Drupal request.

Code

function drupal_get_hash_salt() {
  global $drupal_hash_salt, $databases;
  // If the $drupal_hash_salt variable is empty, a hash of the serialized
  // database credentials is used as a fallback salt.
  return empty($drupal_hash_salt) ? hash('sha256', serialize($databases)) : $drupal_hash_salt;
}