MediaWiki  REL1_24
InvalidPassword Class Reference

Represents an invalid password hash. More...

Inheritance diagram for InvalidPassword:
Collaboration diagram for InvalidPassword:

List of all members.

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.

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.

Since:
1.24

Definition at line 32 of file InvalidPassword.php.


Member Function Documentation

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.

Parameters:
string$passwordPassword to hash
Exceptions:
PasswordErrorIf an internal error occurs in hashing

Reimplemented from Password.

Definition at line 33 of file InvalidPassword.php.

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.

Parameters:
Password | string$otherThe other password
Returns:
bool True if equal, false otherwise

Reimplemented from Password.

Definition at line 40 of file InvalidPassword.php.

Determine if the hash needs to be updated.

Returns:
bool True if needs update, false otherwise

Reimplemented from Password.

Definition at line 44 of file InvalidPassword.php.

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.

Returns:
string

Reimplemented from Password.

Definition at line 36 of file InvalidPassword.php.


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