You are here

class FakePhpassHashedPassword in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php \Drupal\Tests\Core\Password\FakePhpassHashedPassword

A fake class for tests.

Hierarchy

Expanded class hierarchy of FakePhpassHashedPassword

File

core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php, line 178
Contains \Drupal\Tests\Core\Password\PasswordHashingTest.

Namespace

Drupal\Tests\Core\Password
View source
class FakePhpassHashedPassword extends PhpassHashedPassword {
  function __construct() {

    // Noop.
  }

  // Expose this method as public for tests.
  public function enforceLog2Boundaries($count_log2) {
    return parent::enforceLog2Boundaries($count_log2);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FakePhpassHashedPassword::enforceLog2Boundaries public function Ensures that $count_log2 is within set bounds. Overrides PhpassHashedPassword::enforceLog2Boundaries
FakePhpassHashedPassword::__construct function Constructs a new password hashing instance. Overrides PhpassHashedPassword::__construct
PasswordInterface::PASSWORD_MAX_LENGTH constant Maximum password length.
PhpassHashedPassword::$countLog2 protected property 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.
PhpassHashedPassword::$ITOA64 static property Returns a string for mapping an int to the corresponding base 64 character.
PhpassHashedPassword::base64Encode protected function Encodes bytes into printable base 64 using the *nix standard from crypt().
PhpassHashedPassword::check public function Check whether a plain text password matches a hashed password. Overrides PasswordInterface::check
PhpassHashedPassword::crypt protected function Hash a password using a secure stretched hash.
PhpassHashedPassword::generateSalt protected function Generates a random base 64-encoded salt prefixed with hash settings.
PhpassHashedPassword::getCountLog2 public function Parses the log2 iteration count from a stored hash or setting string.
PhpassHashedPassword::hash public function Hash a password using a secure hash. Overrides PasswordInterface::hash
PhpassHashedPassword::HASH_LENGTH constant The expected (and maximum) number of characters in a hashed password.
PhpassHashedPassword::MAX_HASH_COUNT constant The maximum allowed log2 number of iterations for password stretching.
PhpassHashedPassword::MIN_HASH_COUNT constant The minimum allowed log2 number of iterations for password stretching.
PhpassHashedPassword::needsRehash public function Check whether a hashed password needs to be replaced with a new hash. Overrides PasswordInterface::needsRehash