You are here

public function PhpassHashedPassword::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 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 52

Class

PhpassHashedPassword
Secure password hashing functions based on the 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);
}