|
MediaWiki master
|
Implements Argon2, a modern key derivation algorithm designed to resist GPU cracking and side-channel attacks. More...
Inherits MediaWiki\Password\Password.

Public Member Functions | ||||||
| crypt (string $password) | ||||||
Hash a password and store the result in this object.The result of the password hash should be put into the internal state of the hash object.
| ||||||
| needsUpdate () | ||||||
Determine if the hash needs to be updated.
| ||||||
| toString () | ||||||
Convert this hash to a string that can be stored in the database.The resulting string should be considered the serialized representation of this hash, i.e., if the return value were recycled back into PasswordFactory::newFromCiphertext, the returned object would be equivalent to this; also, if two objects return the same value from this function, they are considered equivalent.
| ||||||
| verify (string $password) | ||||||
Checks whether the given password matches the hash stored in this object.
| ||||||
Public Member Functions inherited from MediaWiki\Password\Password | ||||||
| __construct (PasswordFactory $factory, array $config, ?string $hash=null) | ||||||
| Construct the Password object using a string hash. | ||||||
| getType () | ||||||
| Get the type name of the password. | ||||||
Protected Member Functions | |
| isSupported () | |
| Whether current password type is supported on this system. | |
Protected Member Functions inherited from MediaWiki\Password\Password | |
| assertIsSafeSize (string $hash) | |
| Assert that hash will fit in a tinyblob field. | |
| parseHash (?string $hash) | |
| Perform any parsing necessary on the hash to see if the hash is valid and/or to perform logic for seeing if the hash needs updating. | |
Additional Inherited Members | |
Protected Attributes inherited from MediaWiki\Password\Password | |
| array | $config |
| Array of configuration variables injected from the constructor. | |
| PasswordFactory | $factory |
| Factory that created the object. | |
| string null | $hash |
| String representation of the hash without the type. | |
Implements Argon2, a modern key derivation algorithm designed to resist GPU cracking and side-channel attacks.
Definition at line 19 of file Argon2Password.php.
| MediaWiki\Password\Argon2Password::crypt | ( | string | $password | ) |
Hash a password and store the result in this object.The result of the password hash should be put into the internal state of the hash object.
| string | $password | Password to hash |
| PasswordError | If an internal error occurs in hashing |
Reimplemented from MediaWiki\Password\Password.
Definition at line 54 of file Argon2Password.php.
|
protected |
Whether current password type is supported on this system.
Reimplemented from MediaWiki\Password\Password.
Definition at line 32 of file Argon2Password.php.
| MediaWiki\Password\Argon2Password::needsUpdate | ( | ) |
Determine if the hash needs to be updated.
Reimplemented from MediaWiki\Password\Password.
Definition at line 78 of file Argon2Password.php.
| MediaWiki\Password\Argon2Password::toString | ( | ) |
Convert this hash to a string that can be stored in the database.The resulting string should be considered the serialized representation of this hash, i.e., if the return value were recycled back into PasswordFactory::newFromCiphertext, the returned object would be equivalent to this; also, if two objects return the same value from this function, they are considered equivalent.
| PasswordError | if password cannot be serialized to fit a tinyblob. |
Reimplemented from MediaWiki\Password\Password.
Definition at line 69 of file Argon2Password.php.
| MediaWiki\Password\Argon2Password::verify | ( | string | $password | ) |
Checks whether the given password matches the hash stored in this object.
| string | $password | Password to check |
Reimplemented from MediaWiki\Password\Password.
Definition at line 62 of file Argon2Password.php.