-
Notifications
You must be signed in to change notification settings - Fork 2
Hash
Pieter Hordijk edited this page Dec 31, 2018
·
1 revision
Validates the input (string
) to match against a hash (string
).
Available since: 1.0.0
<?php declare(strict_types);
use HarmonyIO\Validation\Rule\Hash\HashMatches;
(new HashMatches('dd74d182c641e4c78502d863b44d0aeff1575e54'))->validate('dd74d182c641e4c78502d863b44d0aeff1575e54');
-
Type.String
when the validated value is not a string -
Hash.HashMatches
when the validated value does not match the hash
Validates the input password (string
) to match against a password hash (string
).
Available since: 1.0.0
<?php declare(strict_types);
use HarmonyIO\Validation\Rule\Hash\PasswordMatches;
(new PasswordMatches('Validation'))->validate('$2y$14$7LWPEV9UaIA6dUFfLcquIOi0MvxlyYAE2wqETRltB6.2cxoWK4cJW');
-
Type.String
when the validated value is not a string -
Hash.PasswordMatches
when the validated password does not match the hash