[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/password/ -> Password.php (summary)

Implements the Password class for the MediaWiki software. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

File Size: 186 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 6 functions

  __construct()
  getType()
  parseHash()
  needsUpdate()
  equals()
  toString()

Functions
Functions that are not part of a class:

__construct( PasswordFactory $factory, array $config, $hash = null )   X-Ref
Construct the Password object using a string hash

It is strongly recommended not to call this function directly unless you
have a reason to. Use the PasswordFactory class instead.

param: PasswordFactory $factory Factory object that created the password
param: array $config Array of engine configuration options for hashing
param: string|null $hash The raw hash, including the type

getType()   X-Ref
Get the type name of the password

return: string Password type

parseHash( $hash )   X-Ref
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.

param: string $hash The hash, with the :<TYPE>: prefix stripped

needsUpdate()   X-Ref
Determine if the hash needs to be updated

return: bool True if needs update, false otherwise

equals( $other )   X-Ref
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.

param: Password|string $other The other password
return: bool True if equal, false otherwise

toString()   X-Ref
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.

return: string



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1