Passwords
class Passwords
Password Hashing.
Methods
__construct($algo = PASSWORD_DEFAULT, array $options = [])
Chooses which secure algorithm is used for hashing and how to configure it.
string
hash(string $password)
Computes password´s hash. The result contains the algorithm ID and its settings, cryptographical salt and the hash itself.
bool
verify(string $password, string $hash)
Finds out, whether the given password matches the given hash.
bool
needsRehash(string $hash)
Finds out if the hash matches the options given in constructor.
Details
at line 33
__construct($algo = PASSWORD_DEFAULT, array $options = [])
Chooses which secure algorithm is used for hashing and how to configure it.
at line 43
string
hash(string $password)
Computes password´s hash. The result contains the algorithm ID and its settings, cryptographical salt and the hash itself.
at line 63
bool
verify(string $password, string $hash)
Finds out, whether the given password matches the given hash.
at line 72
bool
needsRehash(string $hash)
Finds out if the hash matches the options given in constructor.
Traits
Strict class for better experience.