Skip to content

bmutinda/hashing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1. Bcrypt

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/

About

PHP set of libraries for hashing

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages