Lines Matching refs:hash

75 * Generates a random base 64-encoded salt prefixed with settings for the hash.
97 // 6 bytes is the standard salt for a portable phpass hash.
123 * Hash a password using a secure stretched hash.
127 * for an attacker to try to break the hash by brute-force computation of the
131 * The string name of a hashing algorithm usable by hash(), like 'sha256'.
133 * Plain-text password up to 512 bytes (128 to 512 UTF-8 characters) to hash.
135 * An existing hash or the output of _password_generate_salt(). Must be
143 // Prevent DoS attacks by refusing to hash large passwords.
155 // The first 12 characters of an existing hash are its setting string.
172 // We rely on the hash() function being available in PHP 5.2+.
173 $hash = hash($algo, $salt . $password, TRUE);
175 $hash = hash($algo, $hash . $password, TRUE);
177 $len = strlen($hash);
178 $output = $setting . _password_base64_encode($hash, $len);
185 // Parse the log2 iteration count from a stored hash or setting string.
192 * Hash a password using a secure hash.
215 * $account object, for example the uid to look up the hash in a custom table
241 $hash = _password_crypt('sha512', $password, $stored_hash);
248 $hash = _password_crypt('md5', $password, $stored_hash);
253 return ($hash && $stored_hash == $hash);
257 * Check whether a user's hashed password needs to be replaced with a new hash.
260 * password is available. A new hash is needed when the desired iteration count
262 * DRUPAL_HASH_COUNT or if the user's password hash was generated in an update