mirror of
https://github.com/danog/endtoend-test-psl.git
synced 2024-11-30 04:39:48 +01:00
use psalm dev branch
This commit is contained in:
parent
0082c83c0c
commit
1da118e11d
@ -23,7 +23,7 @@
|
|||||||
"friendsofphp/php-cs-fixer": "^2.16",
|
"friendsofphp/php-cs-fixer": "^2.16",
|
||||||
"roave/security-advisories": "dev-master",
|
"roave/security-advisories": "dev-master",
|
||||||
"squizlabs/php_codesniffer": "^3.5",
|
"squizlabs/php_codesniffer": "^3.5",
|
||||||
"vimeo/psalm": "^4.3"
|
"vimeo/psalm": "dev-master"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
@ -14,8 +14,8 @@ namespace Psl\Password;
|
|||||||
function algorithms(): array
|
function algorithms(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
(string) BCRYPT_ALGORITHM,
|
BCRYPT_ALGORITHM,
|
||||||
(string) ARGON2I_ALGORITHM,
|
ARGON2I_ALGORITHM,
|
||||||
(string) ARGON2ID_ALGORITHM,
|
ARGON2ID_ALGORITHM,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -23,8 +23,9 @@ use function password_get_info;
|
|||||||
*/
|
*/
|
||||||
function get_information(string $hash): array
|
function get_information(string $hash): array
|
||||||
{
|
{
|
||||||
|
/** @var array{algoName: string, options: array<string, array-key>} $information */
|
||||||
$information = password_get_info($hash);
|
$information = password_get_info($hash);
|
||||||
$algorithm = (string)$information['algoName'];
|
$algorithm = $information['algoName'];
|
||||||
if (BCRYPT_ALGORITHM === $algorithm) {
|
if (BCRYPT_ALGORITHM === $algorithm) {
|
||||||
return [
|
return [
|
||||||
'algorithm' => $algorithm,
|
'algorithm' => $algorithm,
|
||||||
|
Loading…
Reference in New Issue
Block a user