MediaWiki REL1_32
|
Represents an invalid password hash. More...
Public Member Functions | |
crypt ( $plaintext) | |
Hash a password and store the result in this object. | |
equals ( $other) | |
Compare one Password object to this object. | |
needsUpdate () | |
Determine if the hash needs to be updated. | |
toString () | |
Convert this hash to a string that can be stored in the database. | |
Public Member Functions inherited from Password | |
__construct (PasswordFactory $factory, array $config, $hash=null) | |
Construct the Password object using a string hash. | |
getType () | |
Get the type name of the password. | |
Additional Inherited Members | |
Public Attributes inherited from Password | |
const | MAX_HASH_SIZE = 255 |
Hash must fit in user_password, which is a tinyblob. | |
Protected Member Functions inherited from Password | |
assertIsSafeSize ( $hash) | |
Assert that hash will fit in a tinyblob field. | |
parseHash ( $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. | |
Protected Attributes inherited from Password | |
array | $config |
Array of configuration variables injected from the constructor. | |
PasswordFactory | $factory |
Factory that created the object. | |
string | $hash |
String representation of the hash without the type. | |
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 32 of file InvalidPassword.php.
InvalidPassword::crypt | ( | $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 Password.
Definition at line 33 of file InvalidPassword.php.
InvalidPassword::equals | ( | $other | ) |
Compare one Password object to this object.
By default, do a timing-safe string comparison on the result of Password::toString() for each object. This can be overridden to do custom comparison, but it is not recommended unless necessary.
Password | string | $other | The other password |
Reimplemented from Password.
Definition at line 40 of file InvalidPassword.php.
InvalidPassword::needsUpdate | ( | ) |
Determine if the hash needs to be updated.
Reimplemented from Password.
Definition at line 44 of file InvalidPassword.php.
InvalidPassword::toString | ( | ) |
Convert this hash to a string that can be stored in the database.
The resulting string should be considered the seralized 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 Password.
Definition at line 36 of file InvalidPassword.php.