PHP Classes

Secure Password Generation and Validation: Create and validate password hashes

Recommend this page to a friend!
  Info   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 434 This week: 1All time: 6,284 This week: 560Up
Version License PHP version Categories
secure-password 1.0BSD License5.3PHP 5, Cryptography, Validation, Secu...
Description 

Author

This class can create and validate password hashes.

It can take a password string and create a hash to be able to verify it later without storing the original password text.

It uses only strong algorithms like blowfish, sha256 and sha512 to generate salts with strong entropy using openssl_random_pseudo_bytes or mcrypt_create_iv.

It also implements the standard used by the Mozilla security team to first hash the password using HMAC, then using that hash for the actual hashing sequence.

The class can also verify if a previously generated hash matches a given password.

Picture of Ole Aass
Name: Ole Aass <contact>
Classes: 1 package by
Country: Norway Norway
Age: ???
All time rank: 343910 in Norway Norway
Week rank: 411 Up2 in Norway Norway Up

  Files folder image Files  
File Role Description
Accessible without login Plain text file example1.php Example Basic example
Accessible without login Plain text file example2.php Example Example using HMAC layer
Accessible without login Plain text file hmacKey.txt Example Key used in HMAC example
Accessible without login Plain text file LICENSE.txt Lic. License
Accessible without login Plain text file makeHmacKey.php Example How to generate a HMAC key
Plain text file Password.php Class Main class file

 Version Control Unique User Downloads Download Rankings  
 0%
Total:434
This week:1
All time:6,284
This week:560Up