We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5f5c9e commit 6912e2fCopy full SHA for 6912e2f
1 file changed
README.md
@@ -168,3 +168,16 @@ The T in `db.Query<T>` specifies the object to create for each row. It can be a
168
return db.Query<Val> ("select 'Price' as 'Money', 'Time' as 'Date' from Valuation where StockId = ?", stock.Id);
169
}
170
```
171
+
172
+## Encrypting the database file
173
174
+Add the nuget `SQLitePCLRaw.bundle_e_sqlcipher` to your project containing `sqlite-net2`.
175
176
+Call this right after opening or creating the db, as the 1st instruction.
177
178
+```
179
+var db = new SQLiteConnection(filePath);
180
+db.Execute($"PRAGMA key = '{key}';");
181
182
183
+And use the db as usual.
0 commit comments