//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'); }