PasswordHashService
PasswordHashService.php
:
11
Methods¶
createPasswordHash() ¶
PasswordHashService.php
:
37
Create hash from given plain password.
|
|
If non-provided, the default password hash type will be used.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$plainPassword | string | - | - |
$hashType | int|null | null | - |
Return values
string
getDefaultHashType() ¶
PasswordHashService.php
:
18
Returns default password hash type.
|
|
Return values
int
getSupportedHashTypes() ¶
PasswordHashService.php
:
25
Returns list of supported password hash types.
|
|
Return values
array<string|int, int>
isHashTypeSupported() ¶
PasswordHashService.php
:
30
Shortcut method to check if given hash type is supported.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$hashType | int | - | - |
Return values
bool
isValidPassword() ¶
PasswordHashService.php
:
44
Validates given $plainPassword against $passwordHash.
|
|
If non-provided, the default password hash type will be used.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$plainPassword | string | - | - |
$passwordHash | string | - | - |
$hashType | int|null | null | - |
Return values
bool