by city41 · 15y ago · 0 comments
Simply use the existing MD5/SHA1 hash as input to bcrypt and update all password hashes in your database in one go. Then, whenever the user logs in you first apply the old hash function followed by bcrypt before comparing with what you have in the DB.
My gut instinct would be to do just that but I wonder if there's a better way. You'd probably also want to track the encryption of each user so you know when you can make the final switch.
Another alternative is to just send "update your password" emails to everyone framing it as an improvement to your site's security.
I guarantee everyone with a decent spamfilter will miss those e-mails - that looks exactly like a standard phishing attempt.