How do I convert password hashing from MD5 to SHA?

前端 未结 7 718
谎友^
谎友^ 2020-12-29 08:06

I\'ve got an old application that has user passwords stored in the database with an MD5 hash. I\'d like to replace this with something in the SHA-2 family.

I\'ve tho

7条回答
  •  轮回少年
    2020-12-29 08:23

    I think you've already got the best possibilities. I like #1 more than #2, since there's no use for the md5 once the sha is set.

    There's no way to reverse the MD5, so you have to wait for the user to authenticate again to create a new hash.

提交回复
热议问题