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->password1);
}
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