Skip to content

PHP package for hash/validate passwords using the .NET PasswordHasher algorithm.

Notifications You must be signed in to change notification settings

pnicorelli/php-dotnet-password-hasher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DotNetPasswordHasher

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

About

PHP package for hash/validate passwords using the .NET PasswordHasher algorithm.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages