staysafe / password-policy-builder
A verbose password policy builder
Installs: 40 698
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 3
Open Issues: 1
Requires
- php: ^8.0
- ext-json: *
Requires (Dev)
This package is auto-updated.
Last update: 2024-10-30 01:42:51 UTC
README
Install
Via Composer
$ composer require staysafe/password-policy-builder
Usage
$jsonConstraints = file_get_contents(dirname(__DIR__) . '/fixtures/policy.json'); $policy = new JsonPolicy($jsonConstraints); $passwordPolicyBuilder = new PasswordPolicyBuilder($policy); if ($passwordPolicyBuilder->isValid($password)) { // password meets the Password Policy }
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Credits
- Antonios Pavlakis
- [Peter Mead]
License
The BSD 3-Clause License. Please see License File for more information.