class FakePhpassHashedPassword
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php \Drupal\Tests\Core\Password\FakePhpassHashedPassword
A fake class for tests.
Hierarchy
- class \Drupal\Core\Password\PhpassHashedPassword implements \Drupal\Core\Password\PasswordInterface
- class \Drupal\Tests\Core\Password\FakePhpassHashedPassword extends \Drupal\Core\Password\PhpassHashedPassword
Expanded class hierarchy of FakePhpassHashedPassword
File
-
core/
tests/ Drupal/ Tests/ Core/ Password/ PasswordHashingTest.php, line 177
Namespace
Drupal\Tests\Core\PasswordView source
class FakePhpassHashedPassword extends PhpassHashedPassword {
public function __construct() {
// Noop.
}
/**
* Exposes this method as public for tests.
*/
public function enforceLog2Boundaries($count_log2) {
return parent::enforceLog2Boundaries($count_log2);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
FakePhpassHashedPassword::enforceLog2Boundaries | public | function | Exposes this method as public for tests. | Overrides PhpassHashedPassword::enforceLog2Boundaries |
FakePhpassHashedPassword::__construct | public | 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 | public 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 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.