smarty/lib/md5.js

14 lines
246 B
JavaScript
Raw Normal View History

2017-03-17 18:07:35 +08:00
/**
*
* @authors yutent (yutent@doui.cc)
* @date 2017-01-17 15:50:51
*
*/
"use strict";
const crypto = require('crypto')
module.exports = function(str = ''){
return crypto.createHash('md5').update(str + '', 'utf8').digest('hex')
}