Tchat/controllers/securepw.js

8 lines
222 B
JavaScript
Raw Normal View History

2018-12-26 13:14:06 +01:00
//https://lollyrock.com/articles/nodejs-encryption/
var crypto = require('crypto'),
algorithm = 'sha-256';
module.exports = function(text){
return crypto.createHash('sha256').update(text).digest('base64');
}