Password
in package
Read onlyYes
FinalYes
Password value object
Table of Contents
Properties
- $hash : string
Methods
- __construct() : mixed
- fromHash() : self
- getHash() : string
- Returns hash of a password
- verify() : bool
- Verifies plain password against this password hash
Properties
$hash
private
string
$hash
Methods
__construct()
public
__construct(string $plainPassword[, int $minLength = 8 ]) : mixed
Parameters
- $plainPassword : string
- $minLength : int = 8
Tags
fromHash()
public
static fromHash(string $hash) : self
Parameters
- $hash : string
Tags
Return values
selfgetHash()
Returns hash of a password
public
getHash() : string
Return values
stringverify()
Verifies plain password against this password hash
public
verify(string $plainPassword) : bool
Parameters
- $plainPassword : string
Return values
bool —match