better-sqlite3-multiple-ciphers 8.7.1-beta.0 → 9.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -17,10 +17,10 @@ The fastest and simplest library for SQLite3 in Node.js. This particular fork su
17
17
  ## Current versions
18
18
 
19
19
  - ### Stable
20
- - **better-sqlite3-multiple-ciphers** - [`8.7.0`](https://github.com/m4heshd/better-sqlite3-multiple-ciphers/releases/tag/v8.7.0)
21
- - **better-sqlite3** - [`8.7.0`](https://github.com/JoshuaWise/better-sqlite3/releases/tag/v8.7.0)
22
- - **SQLite** - [`3.43.1`](https://www.sqlite.org/releaselog/3_43_1.html)
23
- - **SQLite3 Multiple Ciphers** - [`1.6.5`](https://github.com/utelle/SQLite3MultipleCiphers/releases/tag/v1.6.5)
20
+ - **better-sqlite3-multiple-ciphers** - [`9.1.1`](https://github.com/m4heshd/better-sqlite3-multiple-ciphers/releases/tag/v9.1.1)
21
+ - **better-sqlite3** - [`9.1.1`](https://github.com/JoshuaWise/better-sqlite3/releases/tag/v9.1.1)
22
+ - **SQLite** - [`3.44.0`](https://www.sqlite.org/releaselog/3_44_0.html)
23
+ - **SQLite3 Multiple Ciphers** - [`1.7.4`](https://github.com/utelle/SQLite3MultipleCiphers/releases/tag/v1.7.4)
24
24
 
25
25
  - ### Beta
26
26
  - **better-sqlite3-multiple-ciphers** - [`v8.7.1-beta.0`](https://github.com/m4heshd/better-sqlite3-multiple-ciphers/releases/tag/v8.7.1-beta.0)
@@ -99,7 +99,7 @@ A database can be encrypted and decrypted simply using `key` and `rekey` `PRAGMA
99
99
  ```js
100
100
  const db = require('better-sqlite3-multiple-ciphers')('foobar.db', options);
101
101
 
102
- db.pragma("rekey='secret-key'");
102
+ db.pragma(`rekey='secret-key'`);
103
103
  db.close();
104
104
  ```
105
105
 
@@ -108,8 +108,8 @@ db.close();
108
108
  ```js
109
109
  const db = require('better-sqlite3-multiple-ciphers')('foobar.db', options);
110
110
 
111
- db.pragma("key='secret-key'");
112
- const row = db.prepare("SELECT * FROM users WHERE id = ?").get(userId);
111
+ db.pragma(`key='secret-key'`);
112
+ const row = db.prepare('SELECT * FROM users WHERE id = ?').get(userId);
113
113
  console.log(row.firstName, row.lastName, row.email);
114
114
  ```
115
115
 
@@ -120,14 +120,25 @@ const db = require('better-sqlite3-multiple-ciphers')('foobar.db', options);
120
120
 
121
121
  db.pragma(`cipher='sqlcipher'`)
122
122
  db.pragma(`legacy=4`)
123
- db.pragma("key='secret-key'");
124
- const row = db.prepare("SELECT * FROM users WHERE id = ?").get(userId);
123
+ db.pragma(`key='secret-key'`);
124
+ const row = db.prepare('SELECT * FROM users WHERE id = ?').get(userId);
125
125
  console.log(row.firstName, row.lastName, row.email);
126
126
  ```
127
127
  The same method should be used if you want to create a new encrypted database that can be opened using DB Browser for SQLite.
128
128
 
129
129
  You can also use [`key()`](https://github.com/m4heshd/better-sqlite3-multiple-ciphers/blob/master/docs/api.md#keybuffer---number) and [`rekey()`](https://github.com/m4heshd/better-sqlite3-multiple-ciphers/blob/master/docs/api.md#rekeybuffer---number) functions for encryption and decryption tasks.
130
130
 
131
+ **GUI database editors:**
132
+
133
+ Even though `better-sqlite3-multiple-ciphers` supports opening databases created
134
+ using [DB Browser for SQLite](https://github.com/sqlitebrowser/sqlitebrowser), it only supports creating/editing legacy
135
+ SQLCipher databases which means, it's highly likely that you won't be able to open a database created
136
+ using `better-sqlite3-multiple-ciphers` in DB Browser for SQLite.
137
+
138
+ To visually edit databases created using `better-sqlite3-multiple-ciphers` regardless of the cipher configuration, it's
139
+ recommended to use a tool like [SQLiteStudio](https://github.com/pawelsalawa/sqlitestudio) because it also
140
+ uses [SQLite3MultipleCiphers](https://github.com/utelle/SQLite3MultipleCiphers) under the hood.
141
+
131
142
  ### Read more about encryption at [SQLite3MultipleCiphers documentation](https://utelle.github.io/SQLite3MultipleCiphers/).
132
143
 
133
144
  ## Why should I use this instead of [node-sqlite3](https://github.com/mapbox/node-sqlite3)?
package/binding.gyp CHANGED
@@ -12,7 +12,7 @@
12
12
  'cflags_cc': ['-std=c++17'],
13
13
  'xcode_settings': {
14
14
  'OTHER_CPLUSPLUSFLAGS': ['-std=c++17', '-stdlib=libc++'],
15
- 'OTHER_LDFLAGS': ['-framework Security', '-framework Foundation'],
15
+ 'OTHER_LDFLAGS': ['-framework Security'],
16
16
  },
17
17
  'msvs_settings': {
18
18
  'VCCLCompilerTool': {
package/deps/setup.ps1 CHANGED
@@ -2,7 +2,7 @@
2
2
  $ErrorActionPreference = "Stop"
3
3
 
4
4
  # SQLite Info
5
- $SQLITEMC_VER = "v1.7.0"
5
+ $SQLITEMC_VER = "v1.7.4"
6
6
  $API_URL = "https://api.github.com/repos/utelle/SQLite3MultipleCiphers/releases/tags/" + $SQLITEMC_VER
7
7
 
8
8
  # Paths