mrprompt / silex-password
Silex Password Provider
dev-master
2016-10-22 15:38 UTC
Requires
- php: >=7.0
- ircmaxell/password-compat: ~1.0
Requires (Dev)
- codeclimate/php-test-reporter: dev-master
- phpunit/phpunit: ^5.1
- silex/silex: ~1.3
This package is auto-updated.
Last update: 2024-12-21 07:08:11 UTC
README
Install
composer require mrprompt/silex-password
Usage
use SilexFriends\Password\Password as PasswordServiceProvider;
$cost = 8;
$app->register(new PasswordServiceProvider($cost));
$passwordClean = 'abcd1234';
// generate
$passwordEncrypted = $app['password.generate']($passwordClean);
// verify
$checkPassword = $app['password.verify']($passwordClean, $passwordEncrypted);
Test
./vendor/bin/phpunit
License
MIT