class vB_Utility_Password_Algorithm_Blowfish extends vB_Utility_Password_Algorithm

Traits

Methods

__sleep()

No description

__wakeup()

No description

static object
instance(string $scheme)

Create an password algorithm object for the given scheme.

__construct($scheme)

No description

array.
generateToken($password)

Hash the password according to the password algorithm

verifyPassword($password, $token)

No description

Details

__sleep()

__wakeup()

static object instance(string $scheme)

Create an password algorithm object for the given scheme.

Parameters

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

Return Value

object An object of type vB_Password_Algorithm

Exceptions

vB_Password_Exception_InvalidScheme

at line 24
protected __construct($scheme)

Parameters

$scheme

at line 38
array. generateToken($password)

Hash the password according to the password algorithm

Will also generate the salt if a salt is not provided. Salts are paired with

Parameters

$password

Return Value

array. An array containing password -- the new password hash salt -- the salt used to generate the password. If the salt is provided then the salt returned will be equivilant to the salt passed in. In the case of the blowfish algorithm the salt is a 22 character string, but the algorithm only uses the top two bits of the last character. The result is that the salt may differ in the last character so long as the top two bits are the same -- this function will return the canonical version of the salt passed to it in cases like that. Since the salts should all be generated by a previous call to this function, which will always return the canonical form, this should not be a problem in actual use.

at line 45
verifyPassword($password, $token)

Parameters

$password
$token