Authentication
in package
AbstractYes
Class Authentication
Table of Contents
Methods
- create() : string
- Create password hash from plaintext password.
- verify() : int
- Verifies that a password matches a hash.
Methods
create()
Create password hash from plaintext password.
public
static create(string $password) : string
Parameters
- $password : string
-
Plaintext password.
Tags
Return values
stringverify()
Verifies that a password matches a hash.
public
static verify(string $password, string $hash) : int
Parameters
- $password : string
-
Plaintext password.
- $hash : string
-
Hash to verify against.
Return values
int —Returns 0 if the check fails, 1 if password matches, 2 if hash needs to be updated.