You are not logged in.
Pages: 1
Please, could someone provide me with a hint, reading or example of how to implement encryption in sqlite3 database with static access? In mormot1 it worked perfectly with the .o and .obj I had. But not now. Thanks
Offline
In mORMot 2, SQLite3 encryption is built into the static library. Here's how to use it:
1. Download static files from https://synopse.info/files/mormot2static.7z
2. Add mormot.db.raw.sqlite3.static to your uses clause
3. Pass password when creating the database:
uses
mormot.db.raw.sqlite3.static,
mormot.orm.sqlite3;
var
Model: TOrmModel;
Rest: TRestServerDB;
begin
Model := TOrmModel.Create([...]);
Rest := TRestServerDB.Create(Model, 'mydata.db3', False, 'MyPassword');
Or with TSqlDatabase directly:
DB := TSqlDatabase.Create('mydata.db3', 'MyPassword');
Important notes:
- This encryption is NOT compatible with official SQLite SEE or wxsqlite3
- NOT compatible with old mORMot 1 format (before 1.18.4413) - use OldSqlEncryptTablePassWordToPlain() to migrate
- Uses AES-128 with PBKDF2 key derivation
Offline
Pages: 1