dsf12123 2016-08-05 04:20
浏览 112
已采纳

使用bcrypt哈希密码迁移系统

I plan to migrate a system developed with PHP Laravel that hashed users password with bcrypt, so just wanted to know is there anyway to convert them somehow in order to make new NodeJS system (with bcrypt) to reuse the current password fields? or the only way forward is to ask user to reset passwords?

  • 写回答

2条回答 默认 最新

  • dpauxqt1281 2016-08-05 04:45
    关注

    Are you asking if the hashed password data (stored on the server, for example) can be used in another bcrypt implementation in node, or something else?

    Using modules in node should work with the existing password data (as someone already suggested), but remember to use the same exact salting method and options as the previous bcrypt implementation in PHP, obviously, so that bcrypt generates the same data as before. As long as all options and input into bcrypt are the same, the bcrypt implementation in node should produce the same results and be able to be used.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?