PHP Password Library 3.0 Documentation

Introduction

The PHP Password Library (PHPassLib) is a library for PHP 5.3+ designed to make working with passwords as easy as possible. Tasks such as creating password hashes, verifying passwords, and migrating stored hashes are made simple.

<?php
require 'PHPassLib.php';
use PHPassLib\Hash\BCrypt;

$hash = BCrypt::hash($password);
if (BCrypt::verify($password, $hash)) {
    // Authentication passed!
}

Overview

Indices and tables