PHPackages                             xjtuwangke/passwordhash - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. xjtuwangke/passwordhash

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

xjtuwangke/passwordhash
=======================

Portable PHP password hashing framework

2129.7k↑220%1PHP

Since Aug 31Pushed 11y ago1 watchersCompare

[ Source](https://github.com/xjtuwangke/passwordhash)[ Packagist](https://packagist.org/packages/xjtuwangke/passwordhash)[ RSS](/packages/xjtuwangke-passwordhash/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (1)

Openwall Phpass, modernized
===========================

[](#openwall-phpass-modernized)

This is froked from hautelook/phpass , modified to static functions

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 Tested

The 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
------------

[](#installation)

Add this requirement to your `composer.json` file and run `composer.phar install`:

```
{
    "require": {
        "hautelook/phpass": "dev-master"
    }
}

```

Usage
-----

[](#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):

```
