function user_hash_password

cis7 password.inc user_hash_password($password, $count_log2 = 0)
cle7 password.inc user_hash_password($password, $count_log2 = 0)
elmsmedia7 password.inc user_hash_password($password, $count_log2 = 0)
icor7 password.inc user_hash_password($password, $count_log2 = 0)
meedjum_blog7 password.inc user_hash_password($password, $count_log2 = 0)
mooc7 password.inc user_hash_password($password, $count_log2 = 0)

Hash a password using a secure hash.

Parameters

$password: A plain-text password.

$count_log2: Optional integer to specify the iteration count. Generally used only during mass operations where a value less than the default is needed for speed.

Return value

A string containing the hashed password (and a salt), or FALSE on failure.

2 calls to user_hash_password()
user_save in modules/user/user.module
Save changes to a user account or add a new user.
user_update_7000 in modules/user/user.install
Increase the length of the password field to accommodate better hashes.

File

includes/password.inc, line 207
Secure password hashing functions for user authentication.

Code

function user_hash_password($password, $count_log2 = 0) {
  if (empty($count_log2)) {
    // Use the standard iteration count.
    $count_log2 = variable_get('password_count_log2', DRUPAL_HASH_COUNT);
  }
  return _password_crypt('sha512', $password, _password_generate_salt($count_log2));
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.