<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ratatoeskr-cms/ratatoeskr/sys/PasswordHash.php, branch master</title>
<subtitle>Ratatöskr is a flexible Content Management System / Blogging Software for PHP 5.3.
</subtitle>
<id>http://git.laria.me/ratatoeskr-cms/atom?h=master</id>
<link rel='self' href='http://git.laria.me/ratatoeskr-cms/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.laria.me/ratatoeskr-cms/'/>
<updated>2020-09-25T21:09:31Z</updated>
<entry>
<title>Use password_hash() and friends to hash and verify passwords</title>
<updated>2020-09-25T21:09:31Z</updated>
<author>
<name>Laria Carolin Chabowski</name>
<email>laria@laria.me</email>
</author>
<published>2020-09-25T21:09:31Z</published>
<link rel='alternate' type='text/html' href='http://git.laria.me/ratatoeskr-cms/commit/?id=5e347e4efaa81c2108256dc927208cd55dc10baa'/>
<id>urn:sha1:5e347e4efaa81c2108256dc927208cd55dc10baa</id>
<content type='text'>
Previously I rolled my own password hashing function. While it at least
used some sort of salt, it's still a terrible idea.

The newly created class PasswordHash wraps the password_hash() family of
functions but can also check the old password hash format (to distinguish
them, the new password hashes are prefixed with a '!'). In
PasswordHash::needsRehash we then always report an hash of the old format
as being in need of a rehash. That way, these old hashes will be replaced
the next time the user successfully logs in.
</content>
</entry>
</feed>
