Since: 4.0.0

class PHPassHandler implements HandlerInterface, CheckIfRehashNeededHandlerInterface

deprecated 4.0 will be removed in 6.0 Support for PHPass hashed passwords will be removed without replacement

Password handler for PHPass hashed passwords

Methods

bool
checkIfRehashNeeded(string $hash)

Check if the password requires rehashing

string
hashPassword(string $plaintext, array $options = [])

Generate a hash for a plaintext password

static bool
isSupported()

Check that the password handler is supported in this environment

bool
validatePassword(string $plaintext, string $hashed)

Validate a password

Details

bool checkIfRehashNeeded(string $hash)

Since: 4.0.0

Check if the password requires rehashing

Parameters

string $hash

The password hash to check

Return Value

bool

string hashPassword(string $plaintext, array $options = [])

Since: 4.0.0

Generate a hash for a plaintext password

Parameters

string $plaintext

The plaintext password to validate

array $options

Options for the hashing operation

Return Value

string

static bool isSupported()

Since: 4.0.0

Check that the password handler is supported in this environment

Return Value

bool

bool validatePassword(string $plaintext, string $hashed)

Since: 4.0.0

Validate a password

Parameters

string $plaintext

The plain text password to validate

string $hashed

The password hash to validate against

Return Value

bool