You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Database encryption is supported through [SQLite Encryption Extension](https://sqlite.org/see) (SEE).
293
+
294
+
As SEE is a paid product, you need to patch the files `react-native-nitro-sqlite/cpp/sqlite/sqlite3.c` and `react-native-nitro-sqlite/cpp/sqlite/sqlite3.h` after installation using `bun patch react-native-nitro-sqlite`. Replace them with the `sqlite.h` and `sqlite3-see-<algorithm>.c` files from the SEE sources.
295
+
296
+
In addition, the [pre-processor flag](#enable-compile-time-options)`SQLITE_ENABLE_SEE` needs to be specified.
297
+
298
+
You can then use encryption, by passing an encryption key when opening the database
299
+
300
+
```typescript
301
+
import {open} from'react-native-nitro-sqlite'
302
+
303
+
const db =open({name: 'myDb.sqlite', encryptionKey: 'SUPER_SECURE_ENCRYPTION_KEY'})
304
+
```
305
+
290
306
# TypeORM
291
307
292
308
This library is pretty barebones, you can write all your SQL queries manually but for any large application, an ORM is recommended.
0 commit comments