使用npm安装: npm install crypto --save
在需要使用的文件中引用crypto import crypto from 'crypto'
使用方法:
var md5 = crypto.createHash("md5");
md5.update(this.password) //需要加密的密码
var password = md5.digest('hex'); //password 加密完的密码
console.log(password);