smarty/lib/md5.js

18 lines
259 B
JavaScript

/**
*
* @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')
}
nodeJS模板引擎,理念源自于PHP的smarty模板引擎
JavaScript 100%