From 5e347e4efaa81c2108256dc927208cd55dc10baa Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Fri, 25 Sep 2020 23:09:31 +0200 Subject: Use password_hash() and friends to hash and verify passwords 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. --- ratatoeskr/sys/pwhash.php | 76 ----------------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 ratatoeskr/sys/pwhash.php (limited to 'ratatoeskr/sys/pwhash.php') diff --git a/ratatoeskr/sys/pwhash.php b/ratatoeskr/sys/pwhash.php deleted file mode 100644 index f52ae03..0000000 --- a/ratatoeskr/sys/pwhash.php +++ /dev/null @@ -1,76 +0,0 @@ -