1
This commit is contained in:
11
tool/md5.js
Normal file
11
tool/md5.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const crypto = require('crypto');
|
||||
|
||||
function getMd5(str) {
|
||||
let obj = crypto.createHash('md5');
|
||||
obj.update(str);
|
||||
return obj.digest('hex');
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getMd5: getMd5
|
||||
};
|
||||
Reference in New Issue
Block a user