1
votes

If I declare and create some SQLite database inside FDConnectionDefs.ini as follows

[SQLITESAMPLE]
Database=sample.sdb
Password=masterkey
LockingMode=Normal
SharedCache=false;
DriverID=SQLite

it should be encrypted with aes-256 as standard settings. FDSQLiteSecurity1.CheckEncryption is returning aes-256

Later, if I add the param Encrypt=aes-256 to that definition my apps still work correctly.

But RAD Studio Data Explorer and FireDAC Explorer will only work with a setting Encrypt=No(with aes-256 I get some corrupt datafile message from these two apps).

If I define the Encrypt=aes-256 param from the beginning all apps do work correct.

Maybe there is some other encryption mode standard defined, if I do not declare encryption mode from the beginning? I wonder about this.

1
Jens have you looked at the SQLite Encryption sample project? C:\Users\Public\Documents\Embarcadero\Studio\20.0\Samples\Object Pascal\Database\FireDAC\Samples\DBMS Specific\SQLite\Encryption\SQLite_Encrypt.dproj - Michael Riley - AKA Gunny

1 Answers

2
votes

The SQLite3 DB file is either encrypted, or not, from the beginning.

You will have to maunally backup the file from one encrypted state to another.

There is no "standard" free encryption on SQLite3. Only a few variants: