PHPackages                             itcover/password-processor - 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. itcover/password-processor

ActiveLibrary[Security](/categories/security)

itcover/password-processor
==========================

Framework-agnostic password processing library

2.0.0(11mo ago)611.1k4PHPPHP &gt;=8.1

Since Nov 1Pushed 11mo ago6 watchersCompare

[ Source](https://github.com/ITCover/PasswordProcessor)[ Packagist](https://packagist.org/packages/itcover/password-processor)[ RSS](/packages/itcover-password-processor/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Password Processor
==================

[](#password-processor)

[![Build Status](https://camo.githubusercontent.com/1e7c28360b9e92c8df29c127f49b5c1920c4b181476aaf6dae28a1fab343357e/68747470733a2f2f7472617669732d63692e6f72672f4954436f7665722f50617373776f726450726f636573736f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ITCover/PasswordProcessor)

Framework-agnostic password-processing library for PHP.

About
-----

[](#about)

Just a little more than a wrapper around PHP's own [password\_\*()](https://secure.php.net/password) functions.

Currently using [bcrypt](https://en.wikipedia.org/wiki/Bcrypt) with a work factor of 11, but both of these will be updated in the future, as more strength becomes necessary.

For new development, it just does the lower-level function calls, abstracting password hashing away from your business logic and giving you one architectural problem less to worry about.

For older applications, it also offers a painless way to upgrade your old password hashing algorithms to a modern one.

**Note:** *This is NOT a fully-featured authentication, authorization or ACL library! It will only ever deal with creating, verifying and updating password hashes.*

### Motivation

[](#motivation)

PHP's [password extension](https://secure.php.net/password) is really great, but it is also still "just" a language primitive - it provides the tools, not the complete solution. As it should be.

This library is that complete solution.

It is designed to hook into your application, not the other way around, so you don't need to worry about how to abstract it. It offers a seamless way to migrate from *any* legacy hashing algorithm, so you don't have to think about that either. It is opinionated and intentionally leaves out any custom options, so there's only one way to use it, no unsafe choices.

Installation
------------

[](#installation)

PHP 5.6 or newer is required. The latest stable version of PHP is always recommended.

### Via [Composer](https://getcomposer.org/) (the easy and recommended way)

[](#via-composer-the-easy-and-recommended-way)

```
composer require itcover/password-processor

```

### Manual (you need to know what you're doing)

[](#manual-you-need-to-know-what-youre-doing)

`git clone` or download and extract an archived version from [here](https://github.com/ITCover/PasswordProcessor/releases)and `require` the *autoload.php* file.

Examples
--------

[](#examples)

### Initialization

[](#initialization)

Implement a Data Access Object to access your password hashes' data source, using `\ITCover\PasswordProcessor\DAOInterface`. Typically, this would be a "users" table in your application's local database.

```
