DoDomuDojade Documentation

Password
in package

Read onlyYes
FinalYes

Password value object

Table of Contents

Properties

$hash  : string

Methods

create()  : self
fromHash()  : self
getHash()  : string
Returns hash of a password
verify()  : bool
Verifies plain password against this password hash
__construct()  : mixed

Properties

Methods

create()

public static create(string $plainPassword[, int $minLength = 8 ]) : self
Parameters
$plainPassword : string
$minLength : int = 8
Tags
throws
ValidationException
Attributes
#[NoDiscard]
Return values
self

fromHash()

public static fromHash(string $hash) : self
Parameters
$hash : string
Attributes
#[NoDiscard]
Return values
self

getHash()

Returns hash of a password

public getHash() : string
Return values
string

verify()

Verifies plain password against this password hash

public verify(string $plainPassword) : bool
Parameters
$plainPassword : string
Return values
bool

match

__construct()

private __construct(string $hash) : mixed
Parameters
$hash : string

        
On this page

Search results