UNPKG

sqlpad

Version:

Web app. Write SQL and visualize the results. Supports Postgres, MySQL, SQL Server, Crate, Vertica and SAP HANA.

11 lines (8 loc) 321 B
const crypto = require('crypto'); const algorithm = 'aes256'; const config = require('../lib/config'); const passphrase = config.get('passphrase'); module.exports = function(text) { const myCipher = crypto.createCipher(algorithm, passphrase); return myCipher.update(text, 'utf8', 'hex') + myCipher.final('hex'); };