PHPackages                             castillo-n/phpass - 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. [Security](/categories/security)
4. /
5. castillo-n/phpass

ActiveLibrary[Security](/categories/security)

castillo-n/phpass
=================

Portable PHP password hashing framework

0.3(13y ago)12.1kPublic DomainPHPPHP &gt;=5.3.3

Since Aug 31Pushed 4y agoCompare

[ Source](https://github.com/castillo-n/phpass)[ Packagist](https://packagist.org/packages/castillo-n/phpass)[ Docs](http://github.com/hautelook/phpass/)[ RSS](/packages/castillo-n-phpass/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

### 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*.

[](#this-repository-is-a-fork-from-the-original-hautelookphpass-which-seems-to-have-been-deleted-on-2021-09-09)

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

[](#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 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": {
        "castillo-n/phpass": "dev-main"
    }
}

```

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):

```
