//首先加载node自带的加密模块var crypto = require('crypto')//使用方法var pwd = ‘abc123’var md5 = crypto.createHash('md5')var newpwd = md5.update(pwd).digest('hex')