bmutinda / hashing
PHP set of libraries for hashing
1.0
2017-06-08 10:43 UTC
Requires
- php: >=5.5.0
Requires (Dev)
- phpunit/phpunit: ^4.0
This package is not auto-updated.
Last update: 2025-07-06 06:09:58 UTC
README
Installation
composer require bmutinda/hashing
Encrypt (Create a hashed string)
$bcrypt = new \Bmutinda\Hashing\Bcrypt();
$hashed = $bcrypt->hash($password);
Compare hash with a plain string
$bcrypt = new \Bmutinda\Hashing\Bcrypt();
$password = "My plain password";
$hashedPassword = "Long hashed string";
$isValid = $bcrypt->verify($password, $hashedPassword)
Running tests
Run this command from your terminal inside the project root
vendor/bin/phpunit tests/