i see that sequelize is compatible with sqlite's sqlcipher extension (docs | merged pr). the code suggests a way to authenticate on the db instance, but i can't find a way to set the cipher.
using sqlite3, can run something like this:
var sqlite = require('sqlite3);
var db = new sqlite.Database('test.db');
db.serialize(
// some sql commands
);
with the sequelize orm for sqlite i can get a db created, but can't get an encrypted instance:
var Sequelize = require('sequelize');
var db = new Sequelize('test.db', 'username', 'secretAsPragmaKey', {option1: true, option2: false});
db.query(
// some sql
);
i've tried running queries on this instance to explicitly set PRAGMA KEY
to the password param, and PRAGMA CIPHER
to sqlcipher's default [aes-256-cfb
], but not while using sequelize.
does the encrypted db need to exist, and sequelize is just opening it? if so, how to ensure the keyed db exists without inserting tables?