public function PhpassHashedPassword::getCountLog2

Parse the log2 iteration count from a stored hash or setting string.

Parameters

String $setting: An existing hash or the output of $this->generateSalt(). Must be at least 12 characters (the settings and salt).

2 calls to PhpassHashedPassword::getCountLog2()
PhpassHashedPassword::crypt in drupal/core/lib/Drupal/Core/Password/PhpassHashedPassword.php
Hash a password using a secure stretched hash.
PhpassHashedPassword::userNeedsNewHash in drupal/core/lib/Drupal/Core/Password/PhpassHashedPassword.php
Implements Drupal\Core\Password\PasswordInterface::userNeedsNewHash().

File

drupal/core/lib/Drupal/Core/Password/PhpassHashedPassword.php, line 203
Definition of Drupal\Core\Password\PhpassHashedPassword

Class

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

Namespace

Drupal\Core\Password

Code

public function getCountLog2($setting) {
  return strpos(static::$ITOA64, $setting[3]);
}