vBulletin v6.0.4

vB_Utility_Password_Algorithm
in package
Uses vB_Utility_Trait_NoSerialize

AbstractYes

Table of Contents

Methods

__serialize()  : array<string|int, mixed>
__sleep()  : array<string|int, mixed>
__unserialize()  : void
__wakeup()  : void
generateToken()  : string
Hash the password according to the password algorithm
instance()  : object
Create an password algorithm object for the given scheme.
requireRehash()  : mixed
Check if the token requires a rehash.
verifyPassword()  : bool
Hash the password according to the password algorithm

Methods

__serialize()

public __serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

__sleep()

public __sleep() : array<string|int, mixed>
Return values
array<string|int, mixed>

__unserialize()

public __unserialize(mixed $serialized) : void
Parameters
$serialized : mixed

generateToken()

Hash the password according to the password algorithm

public abstract generateToken(string $password) : string
Parameters
$password : string

-- The password to encode. It should already have any front end encoding applied.

Return values
string

The pasword token

instance()

Create an password algorithm object for the given scheme.

public static instance(string $scheme) : object
Parameters
$scheme : string

-- the requested password scheme (algorithm + any parameters the argorithm expects such as repetitions.

Tags
throws
vB_Password_Exception_InvalidScheme
Return values
object

An object of type vB_Password_Algorithm

requireRehash()

Check if the token requires a rehash.

public requireRehash(mixed $token) : mixed

This can happen if a scheme uses default options that have been changed.

Parameters
$token : mixed

verifyPassword()

Hash the password according to the password algorithm

public abstract verifyPassword(string $password, mixed $token) : bool
Parameters
$password : string

-- The password to verify. It should already have any front end encoding applied.

$token : mixed
Return values
bool

        
On this page

Search results