Nativescript Sqlcipher
A sqlcipher module for nativescript application.
Inspired by NathanaelA/Nativescript-Sqlite
Create/Open Database
Before creating database, nativescript-sqlcipher module must be imported.
var Database = require('nativescript-sqlcipher');
Then create a new database:
var sqlcipher = new Database(dbname, options, callbackFn)
where in nativescript-sqlite module, options
only support readOnly property where now options can read key property as PRAGMA Key for database encryption.
var options = readOnly: false key: 'Password' // key must be a string
If property key is missing, or in a wrong format. Database would not be encrypted.
Example
var Database = ; var options = key: 'Password' var sqlcipher = 'myDatabase' options; //sqlcipher is a Promise type sqlcipher
Update Log
01 Dec 2017
Fixed Compiling Error in Xcode 9
06 Oct 2017
Added all updates to sqlcipher.ios.js from NathanaelA/Nativescript-Sqlite.