SQLite encryption

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
inageib
Posts: 184
Joined: Wed 26 Aug 2009 14:11

SQLite encryption

Post by inageib » Tue 08 Oct 2019 00:16

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 ?

frickler
Posts: 14
Joined: Wed 04 Apr 2018 08:30

Re: SQLite encryption

Post by frickler » Tue 08 Oct 2019 11:37

Encryption does only work in direct mode. Set uniconnection1.SpecificOptions.Values['Direct'] = 'true'.

inageib
Posts: 184
Joined: Wed 26 Aug 2009 14:11

Re: SQLite encryption

Post by inageib » Tue 08 Oct 2019 19:13

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 >>
---------------------------

frickler
Posts: 14
Joined: Wed 04 Apr 2018 08:30

Re: SQLite encryption

Post by frickler » Wed 09 Oct 2019 06:54

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.

inageib
Posts: 184
Joined: Wed 26 Aug 2009 14:11

Re: SQLite encryption

Post by inageib » Wed 09 Oct 2019 15:14

I encrypted with sqlite maestro . how I can encrypt with unidac ?

frickler
Posts: 14
Joined: Wed 04 Apr 2018 08:30

Re: SQLite encryption

Post by frickler » Thu 10 Oct 2019 13:07


inageib
Posts: 184
Joined: Wed 26 Aug 2009 14:11

Re: SQLite encryption

Post by inageib » Thu 10 Oct 2019 16:46

Wow many thanks frickler
I can connect now !!

Post Reply