Last active
December 11, 2015 05:39
-
-
Save hachi-eiji/4553811 to your computer and use it in GitHub Desktop.
Node.js Tips
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var crypto = require('crypto'); | |
exports.toMd5 = function(src) { | |
var md5 = crypto.createHash('md5'); | |
md5.update(src); | |
return md5.digest('hex'); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment