const crypto = require('crypto');
var obj = crypto.createHash('md5');
obj.update('12');// 签名
var str = obj.digest('hex') //16禁止
console.log(str);
md5 模块
const crypto = require('crypto'); module.exports = { MD5_SUFFIX: 'asdasdasdasdasdasdasd)asd', md5: function (str) { var obj = crypto.createHash('md5'); obj.update(str); return obj.digest('hex'); } };