Commit 49c5fdee authored by Kamron Aroonrua's avatar Kamron Aroonrua 💬

hash

parent e123f25f
var crypto = require('crypto');
module.exports.sha256 = function (text) {
return crypto.createHash('sha256').update(text).digest('hex');
var dat = (typeof text == 'string')?text:String(text);
return crypto.createHash('sha256').update(dat).digest('hex');
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment