@@ -96,7 +96,7 @@ Emscripten or any JavaScript glue code.
9696
9797Please note that stable web support for ` package:sqlite3 ` is restricted to Dart
9898being compiled to JavaScript. Support for ` dart2wasm ` is experimental. The API
99- is identical, but the implementation [ is severly limited] ( https://github.com/simolus3/sqlite3.dart/issues/230 ) .
99+ is identical, but the implementation [ is severely limited] ( https://github.com/simolus3/sqlite3.dart/issues/230 ) .
100100
101101### Setup
102102
@@ -130,7 +130,7 @@ in `package:sqlite3/sqlite3.dart`, databases can be opened in similar ways.
130130
131131An example for such web folder is in ` example/web/ ` of this repo.
132132To view the example, copy a compiled ` sqlite3.wasm ` file to ` web/sqlite3.wasm ` in this directory.
133- Then, run ` dart run build_runner serve example:8080 ` and visit ` http://localhost:8080/web/ ` in a browser.
133+ Then, run ` dart run build_runner serve example:8080 ` and visit ` http://localhost:8080/web/ ` in a browser.
134134
135135Another ` example/multiplatform/ ` uses common interface to ` sqlite3 ` on web and native platforms.
136136To run this example, merge its files into a Flutter app.
@@ -143,6 +143,26 @@ version in `package:sqlite3/wasm.dart`.
143143By having shared code depend on the common interfaces, it can be used for both native and web
144144apps.
145145
146+ ### Web encryption
147+
148+ Starting from version 2.6.0, ` package:sqlite3/wasm.dart ` supports loading a compiled version of
149+ [ SQLite Multiple Ciphers] ( https://utelle.github.io/SQLite3MultipleCiphers/ ) providing encryption
150+ support for the web.
151+ Please note that this variant is not currently tested as well as the regular SQLite version.
152+ For this reason, using SQLite Multiple Ciphers with ` package:sqlite3/wasm.dart ` should be considered
153+ experimental for the time being.
154+
155+ To test the encryption integration, download ` sqlite3mc.wasm ` from the [ releases] ( https://github.com/simolus3/sqlite3.dart/releases )
156+ of this package and use that as a URL to load sqlite3 on the web:
157+
158+ ``` dart
159+ final sqlite3 = await WasmSqlite3.loadFromUrl(Uri.parse('sqlite3mc.wasm'));
160+ sqlite3.registerVirtualFileSystem(InMemoryFileSystem(), makeDefault: true);
161+
162+ final database = sqlite3.open('/database')
163+ ..execute("pragma key = 'test';"); // TODO: Replace key
164+ ```
165+
146166### Testing
147167
148168To run the tests of this package with wasm, either download the ` sqlite3.wasm ` file from the
0 commit comments