Page 1 of 1

SQLite encryption

Posted: Tue 08 Oct 2019 00:16
by inageib
Hi

I encrypt my sqlite database using Delphi sample application to encrypted the file but now I am trying to open the database using unidac uniconnect1 and I set the encryption key in the option tab but I get this error when I try to connect:

Code: Select all

---------------------------
Error
---------------------------
SQLite DLL that you are using does not support SQLite database encryption. 
Please download a new DLL or recompile the existing one with encryption support. .
---------------------------
OK   Details >>   
---------------------------
How to fix this ?

Re: SQLite encryption

Posted: Tue 08 Oct 2019 11:37
by frickler
Encryption does only work in direct mode. Set uniconnection1.SpecificOptions.Values['Direct'] = 'true'.

Re: SQLite encryption

Posted: Tue 08 Oct 2019 19:13
by inageib
When I specify "leAES128" for encryption algrithms I get "not a database file" and if I used "leDefault" I get
---------------------------
Error
---------------------------
The EncryptionKey property must be empty when no encryption algorithm specified.
---------------------------
OK Details >>
---------------------------

Re: SQLite encryption

Posted: Wed 09 Oct 2019 06:54
by frickler
Did you encrypt using unidac? Problem is, there is no standard encryption of SQLite. FireDAC has its own Unidac has its own, DISQLITE has its own. So to decrypt a SQLite database you have to use the exact same components you used to encrypt.

Re: SQLite encryption

Posted: Wed 09 Oct 2019 15:14
by inageib
I encrypted with sqlite maestro . how I can encrypt with unidac ?

Re: SQLite encryption

Posted: Thu 10 Oct 2019 13:07
by frickler

Re: SQLite encryption

Posted: Thu 10 Oct 2019 16:46
by inageib
Wow many thanks frickler
I can connect now !!