Migrate old md5 passwords to bcrypt passwords

前端 未结 4 411
耶瑟儿~
耶瑟儿~ 2020-12-28 08:09

I\'m reworking a website in Rails using Devise for authentication. The previous website works with a database of users with md5 passwords, and therefore I want to migrate th

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-28 08:34

    There is no way to convert an md5 hash into another kind of hash. You will have to make users log in using the old system, and then hash the password they give using the new method. Once you have the new hash, you can delete the old, md5 hash.

提交回复
热议问题