function PhpassHashedPassword::hash

Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Password/PhpassHashedPassword.php \Drupal\Core\Password\PhpassHashedPassword::hash()

Overrides PasswordInterface::hash

File

core/lib/Drupal/Core/Password/PhpassHashedPassword.php, line 216

Class

PhpassHashedPassword
Secure hashing functions based on Portable PHP password hashing framework.

Namespace

Drupal\Core\Password

Code

public function hash($password) {
    return $this->crypt('sha512', $password, $this->generateSalt());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.