TVJR/controllers/securepw.js

8 lines
222 B
JavaScript
Raw Normal View History

2018-12-12 16:25:12 +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');
}