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?
关注
码龄 粉丝数 原力等级 --
- 被采纳
- 被点赞
- 采纳率

已采纳
使用bcrypt哈希密码迁移系统
收起
- 写回答
- 好问题 0 提建议
- 关注问题
微信扫一扫
点击复制链接分享
- 邀请回答
- 编辑 收藏 删除 结题
- 收藏 举报
2条回答 默认 最新
- 关注
码龄 粉丝数 原力等级 --
- 被采纳
- 被点赞
- 采纳率
dpauxqt1281 2016-08-04 20: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.
本回答被题主选为最佳回答 , 对您是否有帮助呢? 本回答被专家选为最佳回答 , 对您是否有帮助呢? 本回答被题主和专家选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏举报微信扫一扫
点击复制链接分享
编辑预览轻敲空格完成输入- 显示为
- 卡片
- 标题
- 链接
评论按下Enter换行,Ctrl+Enter发表内容
编辑
预览

轻敲空格完成输入
- 显示为
- 卡片
- 标题
- 链接
报告相同问题?
提交
- 2012-07-13 20:58回答 2 已采纳 Using Andrew Moore's class, you need to call the class verify() method to verify that the user's p
- 2016-02-01 22:04回答 1 已采纳 You shouldn't expect them to match, at least by default. This is because for both functions, a ran
- 2019-07-17 00:40回答 1 已采纳 You don't need to split the hashed password, why you want to do that? Just use the PHP native pass
- 2019-12-28 04:31p15097962069的博客 我时不时听到“使用bcrypt在PHP中使用密码,bcrypt规则存储密码”的建议。 但是bcrypt是什么? PHP不提供任何此类功能,维基百科对文件加密实用程序不屑一顾,而Web搜索仅
- 2012-07-04 01:38回答 1 已采纳 You must store the password AND the salt used when you BCrypt, or you'll never get the same string
- 2018-03-01 13:06回答 1 已采纳 You're passing "username" instead of actualPassword if valid, err := validateCredentials(actualPa
- 2011-01-25 07:34回答 9 已采纳 bcrypt is a hashing algorithm which is scalable with hardware (via a configurable number of rounds
- 2017-02-21 08:51- **密码哈希(Password Hashing)**:Laravel默认使用Bcrypt算法对用户密码进行哈希处理,保证即使数据库泄露,密码也不会直接暴露。 - **CSRF防护**:Laravel会自动生成CSRF令牌并插入到表单中,以防止跨站请求...
- 2011-01-25 07:34回答 9 已采纳 bcrypt is a hashing algorithm which is scalable with hardware (via a configurable number of rounds
- 2023-02-03 10:00回答 2 已采纳 我理解下来,数据库里面的密码之前是明文存储,现在想要变成密文,即加密存储?如果是这样的话,有2个思路: SQL脚本修改数据库密码这个字段:update user set password = hash
- 2021-10-05 14:23bcrypt 是一种流行的密码哈希算法,它结合了 Blowfish 加密算法和动态工作因子(work factor),确保即使在硬件性能不断提升的情况下,哈希密码的过程仍然保持足够耗时,从而抵御彩虹表攻击。 在 Node.js 中,...
- 2020-10-16 20:31但需要注意的是,这种哈希在跨语言数据库迁移时可能不兼容,如Java或.NET。 总结: PHP生成随机码的方法多种多样,可以根据需求选择适合的方法。基础方法如ASCII码生成和字符数组选择,适用于简单的场景。而加密...
- 2020-10-15 02:30它使用了Bcrypt哈希算法对用户密码进行加密处理,以确保密码的安全。在用户登录时,Laravel会验证输入的密码与数据库中存储的加密密码是否匹配。 Laravel的用户认证系统还提供了其他一些功能,比如记住我功能,允许...
- 2024-06-03 08:30清欢渡的博客 实际的 PHP 项目开发中,我积累了丰富的经验和体会。明确项目需求、功能模块,绘制项目架构图,确定数据库设计等,这将有助于项目的顺利进行和后期的扩展。设计模式与代码规范:熟悉常见的设计模式,并遵循良好的...
- 2024-09-06 08:07Lrrrissss的博客 简介:这款基于PHP开发的校园订餐系统为学生和教职工提供线上订餐服务,设计简洁、界面友好。它不仅是一个实用软件,也是一个学习平台,让开发者可以深入掌握PHP编程及Web应用开发的基础知识。系统中可能采用了MVC...
- 2024-06-03 06:51asdfggzc的博客 学习php从入门到精通
- 2024-06-03 06:33asdfggzc的博客 php实验教程效果
- 2024-06-03 06:25asdfggzc的博客 开发工具的选择和使用:介绍了一些常用的开发工具和编辑器,如Sublime Text、PhpStorm等,并讲解了它们的使用方法和技巧。代码规范和风格:讲解了一些常用的代码规范和风格,如PSR规范、命名规范、注释规范等,帮助...
- 2023-06-19 05:56焦仙的博客 我的这套线路可能跟许多学习php的爱好者不谋而合,这也算是一个循序渐进的学习过程,不过新手不要看到上面的概括就以为学习蛮简单的,默默在此不得不对你稍微泼一下冰水,任何东西其实都不简单,即使是街边的臭豆腐...
- 没有解决我的问题, 去提问
联系我们(工作时间:8:30-22:00)
400-660-0108kefu@csdn.net在线客服
- 京ICP备19004658号
- 经营性网站备案信息
公安备案号11010502030143
- 营业执照
- 北京互联网违法和不良信息举报中心
- 家长监护
- 中国互联网举报中心
- 网络110报警服务
- Chrome商店下载
- 账号管理规范
- 版权与免责声明
- 版权申诉
- 出版物许可证
- ©1999-2025北京创新乐知网络技术有限公司