MediaWiki  master
InvalidPassword Class Reference

Represents an invalid password hash. More...

Inheritance diagram for InvalidPassword:
Collaboration diagram for InvalidPassword:

Public Member Functions

 crypt (string $plaintext)
 needsUpdate ()
 toString ()
 verify (string $password)
- Public Member Functions inherited from Password
 __construct (PasswordFactory $factory, array $config, string $hash=null)
 Construct the Password object using a string hash. More...
 crypt (string $password)
 Hash a password and store the result in this object. More...
 getType ()
 Get the type name of the password. More...
 needsUpdate ()
 Determine if the hash needs to be updated. More...
 toString ()
 Convert this hash to a string that can be stored in the database. More...
 verify (string $password)
 Checks whether the given password matches the hash stored in this object. More...

Additional Inherited Members

- Public Attributes inherited from Password
const MAX_HASH_SIZE = 255
 Hash must fit in user_password, which is a tinyblob. More...
- Protected Member Functions inherited from Password
 assertIsSafeSize (string $hash)
 Assert that hash will fit in a tinyblob field. More...
 isSupported ()
 Whether current password type is supported on this system. More...
 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. More...
- Protected Attributes inherited from Password
array $config
 Array of configuration variables injected from the constructor. More...
PasswordFactory $factory
 Factory that created the object. More...
string null $hash
 String representation of the hash without the type. More...

Detailed Description

Represents an invalid password hash.

It is represented as the empty string (i.e., a password hash with no type).

No two invalid passwords are equal. Comparing anything to an invalid password will return false.


Definition at line 34 of file InvalidPassword.php.

Member Function Documentation

◆ crypt()

InvalidPassword::crypt ( string  $plaintext)

Definition at line 35 of file InvalidPassword.php.

◆ needsUpdate()

InvalidPassword::needsUpdate ( )

Definition at line 46 of file InvalidPassword.php.

◆ toString()

InvalidPassword::toString ( )

Definition at line 38 of file InvalidPassword.php.

◆ verify()

InvalidPassword::verify ( string  $password)

Definition at line 42 of file InvalidPassword.php.

The documentation for this class was generated from the following file: