UNPKG

sqlpad

Version:

Web app for writing and running SQL queries and visualizing the results. Supports Postgres, MySQL, SQL Server, Crate and Vertica.

9 lines (7 loc) 273 B
var crypto = require('crypto') var algorithm = 'aes256' var config = require('./config.js') module.exports = function(text) { var myCipher = crypto.createCipher(algorithm, config.get('passphrase')) return myCipher.update(text, 'utf8', 'hex') + myCipher.final('hex') }