function user_hash_password

7.x password.inc user_hash_password($password, $count_log2 = 0)
6.x password.inc user_hash_password($password, $count_log2 = 0)
5.x 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.

4 calls to user_hash_password()
install_perform_install in ./install.php
Actually performs the installation of FlightPath
user_edit_student_user_form_submit in modules/user/user.student.inc
Submit handler for editing student users.
user_edit_user_form_submit in modules/user/user.module
Submit handler for our edit faculty form
user_user_settings_form_submit in modules/user/user.module
Save values from our settings form into the user_settings table (or other tables), as appropriate.

File

includes/password.inc, line 283
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', FP_HASH_COUNT);
  }
  return _password_crypt('sha512', $password, _password_generate_salt($count_log2));
}