only-cliches / Nano-SQL

Universal database layer for the client, server & mobile devices. It's like Lego for databases.
https://nanosql.io
MIT License
782 stars 49 forks source link

sqlite cipher #93

Open julioch opened 6 years ago

julioch commented 6 years ago

Hey, It would be interesting to be able to integrate sqlite cipher with nanosql.

Recently I have seen the need to have my local db encrypted and I was delighted with nanosql. I'm not sure if you already have any encryption option. That is why I suggested this possibility.

only-cliches commented 6 years ago

There's a few directions you could take with this:

  1. Grab the current SQLite adapter and tweak it for SQLite Cipher support. It looks like you need to build SQLite with cipher support, the nodeJS plugin has special instructions.

  2. nanoSQL 2.0 supports filtering the row data as it goes into and out of the database. I can put an encryption plugin on the feature list. It would use aes-js and bcryptjs, support any database (including indexedDB), and run in the browser or nodejs. The only downside to this is the primary keys and table names would not be encrypted, for that you'd need full database encryption like what SQLite Cipher provides.

julioch commented 6 years ago

nanoSQL 2.0 is it released?... Btw I forgot to mention that I am working with the nanoSQL version for cordova.

only-cliches commented 6 years ago

2.0 isn't released yet, probably will happen towards the end of the year. I've added the encryption plugin to the development schedule, should happen early next year.