0.4.0-alpha.0 • Published 5 years ago

unix-sqlcipher v0.4.0-alpha.0

Weekly downloads
41
License
-
Repository
github
Last release
5 years ago

unix-sqlcipher

Encrypted sqlite3 for MacOS and Linux See also: cross-sqlcipher

npm install unix-sqlcipher

# for NW.js (formally node-webkit)
npm i unix-sqlcipher --runtime=node-webkit --target=0.12.3 --target_arch=x64
var sqlite3 = require('unix-sqlcipher').verbose();
var db = new sqlite3.Database('test.db');

db.serialize(function() {
  db.run("PRAGMA KEY = 'secret'");
  db.run("PRAGMA CIPHER = 'aes-128-cbc'");

  db.run("DROP TABLE IF EXISTS lorem");
  db.run("CREATE TABLE lorem (info TEXT)");

  var stmt = db.prepare("INSERT INTO lorem VALUES (?)");
  for (var i = 0; i < 10; i++) {
    stmt.run("Ipsum " + i);
  }
  stmt.finalize();

  db.each("SELECT rowid AS id, info FROM lorem", function(err, row) {
    console.log(row.id + ": " + row.info);
  });
});

db.close();

Credits

0.4.0-alpha.0

5 years ago

0.0.7-alpha.2

6 years ago

0.0.7-alpha.1

6 years ago

0.0.7-alpha

6 years ago

0.0.6-alpha

6 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago

0.0.0

8 years ago