AuthStrategyInterface
in
Interface AuthStrategyInterface
Tags
Table of Contents
- getHash() : string
- Generates a hash by given password string.
- getRehashedPassword() : string
- Returns a rehashed password hash if it does not match the currently used hashing algorithm.
- verify() : bool
- Verifies a given password by its stored hash from the current hashing algorithm.
Methods
getHash()
Generates a hash by given password string.
public
getHash(StringType $password) : string
Parameters
- $password : StringType
-
String that should be hashed.
Tags
Return values
string —Resulting hash.
getRehashedPassword()
Returns a rehashed password hash if it does not match the currently used hashing algorithm.
public
getRehashedPassword(StringType $password, NonEmptyStringType $hash[, AuthStrategyCollection|null $authStrategyCollection = null ]) : string
Parameters
- $password : StringType
-
Password that should be rehashed by a new algorithm.
- $hash : NonEmptyStringType
-
Current password hash.
- $authStrategyCollection : AuthStrategyCollection|null = null
-
Collection of hashing algorithms.
Return values
string —The new password hash.
verify()
Verifies a given password by its stored hash from the current hashing algorithm.
public
verify(StringType $password, NonEmptyStringType $hash[, AuthStrategyCollection $authStrategyCollection = null ]) : bool
Parameters
- $password : StringType
- $hash : NonEmptyStringType
- $authStrategyCollection : AuthStrategyCollection = null
Return values
bool —Is the password valid?