pnicorelli / php-dotnet-password-hasher
php package for hash/validate passwords using the .NET PasswordHasher algorithm.
Installs: 18
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/pnicorelli/php-dotnet-password-hasher
Requires
- php: ^7.0
Requires (Dev)
- phpunit/phpunit: ^7.4
This package is auto-updated.
Last update: 2025-12-26 08:29:48 UTC
README
PHP package for hash/validate passwords using the .NET PasswordHasher algorithm.
Install
composer require pnicorelli/php-dotnet-password-hasher
Usage
<?php require("vendor/autoload.php"); use DotNetPasswordHasher\DotNetPasswordHasher; $hash = DotNetPasswordHasher::hash("CorrectHorseBatteryStaple"); if( DotNetPasswordHasher::verify("CorrectHorseBatteryStaple", $hash) ) { // Password match echo "yeah!"; } else { // Password mismatch echo "Nooooo"; }
Test
./vendor/bin/phpunit test/*