function PhpassHashedPassword::__construct

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

Constructs a new password hashing instance.

Parameters

int $countLog2: Password stretching iteration count. Specifies the number of times the hashing function will be applied when generating new password hashes. The number of times is calculated by raising 2 to the power of the given value.

1 method overrides PhpassHashedPassword::__construct()
FakePhpassHashedPassword::__construct in core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php
Constructs a new password hashing instance.

File

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

Class

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

Namespace

Drupal\Core\Password

Code

public function __construct($countLog2) {
    // Ensure that $countLog2 is within set bounds.
    $this->countLog2 = $this->enforceLog2Boundaries($countLog2);
}

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