Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bordoni/phpass
Fork from hautelook/phpass since that repo was deleted.
https://github.com/bordoni/phpass
Last synced: 7 days ago
JSON representation
Fork from hautelook/phpass since that repo was deleted.
- Host: GitHub
- URL: https://github.com/bordoni/phpass
- Owner: bordoni
- Created: 2021-09-10T02:32:38.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-27T16:19:19.000Z (over 2 years ago)
- Last Synced: 2024-12-10T00:41:02.411Z (16 days ago)
- Language: PHP
- Homepage: https://packagist.org/packages/bordoni/phpass
- Size: 13.7 KB
- Stars: 21
- Watchers: 2
- Forks: 25
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### This repository is a fork from the original [hautelook/phpass](https://github.com/hautelook/phpass) which seems to have been deleted on _2021-09-09_.
Openwall Phpass, modernized
===========================This is Openwall's [Phpass](http://openwall.com/phpass/), based on the 0.3 release, but modernized slightly:
- Namespaced
- Composer support (Autoloading)
- PHP 5 style
- Unit TestedThe changes are minimal and only stylistic. The source code is in the public domain. We claim no ownership, but needed it for one of our projects, and wanted to make it available to other people as well.
## Installation ##
Add this requirement to your `composer.json` file and run `composer.phar install`:
{
"require": {
"bordoni/phpass": "dev-main"
}
}## Usage ##
The following example shows how to hash a password (to then store the hash in the database), and how to check whether a provided password is correct (hashes to the same value):
``` php
HashPassword('secret');
var_dump($password);
$passwordMatch = $passwordHasher->CheckPassword('secret', "$2a$08$0RK6Yw6j9kSIXrrEOc3dwuDPQuT78HgR0S3/ghOFDEpOGpOkARoSu");
var_dump($passwordMatch);