Skip to content
rchouinard edited this page Jul 3, 2012 · 9 revisions

The PHP Password Library is a password hashing library designed for PHP 5.3+. The goal of this project is to make it easier, and hopefully then more likely, for developers to work with secure password storage methods. The library is designed to work easily with a variety of password hashing modules, including methods to migrate between hash functions and configurations.

An example quick-start using the default BCrypt module can be seen below:

<?php
use Phpass\Hash;

$crypt = new Hash;
$hash = $crypt->hashPassword($password);
if ($crypt->checkPassword($password, $hash)) {
    // The user is authenticated
}

Introduction

Clone this wiki locally