var crypto = require('crypto'); //加载加密文件
var md5 = crypto.createHash('md5');
module.exports={
md5:function(str){ //暴露出md5s方法
md5.update(str);
str = md5.digest('hex');
return str;
}
}

注意:先安装模块crypto

相关文章:

  • 2022-01-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2021-08-06
相关资源
相似解决方案