const crypto = require("crypto");
let md5 = crypto.createHash("md5");
left newPass = md5.update("加密的密码").digest("hex");hex表示十六进制加密
本文介绍了一个使用Node.js中的crypto模块进行MD5密码加密的简单示例。通过创建一个MD5哈希对象并更新要加密的密码,最后获取到十六进制格式的密文。
const crypto = require("crypto");
let md5 = crypto.createHash("md5");
left newPass = md5.update("加密的密码").digest("hex");hex表示十六进制加密
2091
1032

被折叠的 条评论
为什么被折叠?