Jump to content
Frédéric

FireDAC encrypted SQLite DB with Delphi 12.3 x64

Recommended Posts

Hello,

I'm using a SQLite (aes-128) encrypted database. If I compile the application in 32bit then it works correctly and the database can be opened.
The same application + same database compiled in 64bit generates an AV in FireDACSQliteDriver290.bpl (Read of FFFFFFFFFFFF...).

The database can be opened in the IDE 32bit but same error if I try to open it in the 64bit IDE.

'Engine linkage' is set as slFDEStatic and I have only FireDAC.Phys.SQLiteWrapper.FDEStat unit in the uses.

 

Note: the same non encrypted database can be opened in the 64bit IDE but I have the same problem when starting the application.

 

Is this something known ?

 

Thanks !!!

 

 

Share this post


Link to post

According to the unit mentioned, the libraries named sqlite3_fde_x64.obj/sqlite3_fde_x86.obj are used. They come with Delphi and are located in subfolders of $(BDSLIB).

Share this post


Link to post

Yes, the sqlite3_fde_x64.obj should be used in this case. Again it works in 32bits but not 64 (with exact same database of course).
Theorically it's way 3 that I use.
But as it happens also directly in the 64bit IDE I suspect a bug in the embarcadero libraries ?

 

Has someone used succesfully the same cases ? 

Share this post


Link to post

I've recompiled my encryption tool also with Delphi 12.3 and also in 64bit. Now it works !

At the moment not sure if my encryption tool (Really nohing special, simply using TFDSQLiteSecurity to make the encryption) was simply outdated or we need to do a bitness wise encryption to make it work. This would mean we cannot share the same database between the same 32 and 64 application. Seems weird...

I will be able to do more tests regarding this in the next few days...

Thanks !

Share this post


Link to post

Sorry, wrong information, I've checked it with the 32bit version, problem remain the same with the 64bit version.

This gives an answer if the encryption method should also be separated between 32 and 64bits.

 

I will make a sample to be able to report the problem to embarcadero.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×