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

0.0.1 2018-10-25 15:48 UTC

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/*