nodejs自带加密模块md5加密:
var crypto = require('crypto');
function cryptoMD5(content){
var md5 = crypto.createHash('md5');
md5.update(content);
return md5.digest('hex');
}
exports.cryptoMD5 = cryptoMD5;
批量给sql server数据库中的密码字段MD5加密:
update tableName
set password=right(sys.fn_VarBinToHexStr(hashbytes('MD5',CONVERT(varchar(64), password))),32)
where password is not null