<?php
/**
* This example uses an extra layer of security by first hashing the password through a
* HMAC hash before it is sent to the crypt function.
*
* To learn more about this method please read through my blog post:
* http://oleaass.com/two-step-password-hashing-with-hmac-and-bcrypt/
*/
require_once('Password.php');
$pw = new Password;
$pw->hmacEnabled = true;
$pw->hmacKey = file_get_contents('hmacKey.txt');
$hashed = $pw->hash('verysecret');
var_dump($hashed);
|