Jan Walraven
DevOps



Menu
Categories:
Posted on

Howto safely store a password using ZF2


//add this to your class
use ZendCryptPasswordBcrypt;

//Setup the encryption class $bcrypt = new Bcrypt();

//Encrypt the password $hash = $bcrypt->create(‘password’);

//Verify password if ($bcrypt->verify(‘password’, $hash)){ //correct password }