Difference between #6 and #8 of
Authenticating against phpass hashes with Yii

Revision #8 has been created by Da:Sourcerer on Feb 22, 2012, 9:47:51 AM with the memo:

Fixed bug mentioned by fr0d0z
« previous (#6) next (#9) »

Changes

Title unchanged

Authenticating against phpass hashes with Yii

Category unchanged

How-tos

Yii version unchanged

Tags unchanged

Authentication, security

Content changed

[...]
public function beforeSave()
{
if(!empty($this->password1) && $this->password1==$this->password2)
{
$ph=new PasswordHash(Yii::app()->params['phpass']['iteration_count_log2'], Yii::app()->params['phpass']['portable_hashes']);
$this->password=$ph->HashPassword($this->password
1);
}
return parent::beforeSave();
[...]
-----

- [How to manage a PHP application's users and passwords](http://www.openwall.com/articles/PHP-Users-Passwords)

 
- [Wikipedia (en): bcrypt](http://en.wikipedia.org/wiki/Bcrypt "[Wikipedia (en)] bcrypt")
 
- [USENIX99](http://www.usenix.org/events/usenix99/provos.html "USENIX99: A Future-Adaptable Password Scheme") - Original bcrypt proposal
22 0
28 followers
Viewed: 29 881 times
Version: 1.1
Category: How-tos
Written by: Da:Sourcerer
Last updated by: Da:Sourcerer
Created on: Sep 21, 2011
Last updated: 3 years ago
Update Article

Revisions

View all history