bmutinda / hashing
PHP set of libraries for hashing
Installs: 115
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/bmutinda/hashing
Requires
- php: >=5.5.0
Requires (Dev)
- phpunit/phpunit: ^4.0
This package is not auto-updated.
Last update: 2025-10-26 07:42:42 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/