2015-12-04 00:28:18 +08:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var crypto = require('crypto');
|
|
|
|
|
2019-12-24 01:19:08 +08:00
|
|
|
module.exports = function generateMD5 (data) {
|
2015-12-04 00:28:18 +08:00
|
|
|
var hash = crypto.createHash('md5');
|
|
|
|
hash.update(data);
|
|
|
|
return hash.digest('hex');
|
|
|
|
};
|