SQLLite Android encrypt

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
bwilt
Posts: 15
Joined: Wed 07 Aug 2013 01:45

SQLLite Android encrypt

Post by bwilt » Thu 27 Nov 2014 03:50

Hello,
I have a Unidac 6.0.1 laAES256 encrypted SQLite file which opens fine under win32.

Under Android I'm getting the error :-

EReadError: "EncryptionAlgorithm" is not a valid option name for SQLite UniProvider.

I'm trying to use Direct mode, is just this form of encryption not enabled under Android ?

Do I need to deploy a different Sqlite static library ?

Regards,
Brett.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: SQLLite Android encrypt

Post by AlexP » Thu 27 Nov 2014 06:50

Hello,

Encryption is implemented by us in the Direct mode supported for Windows platforms only. For other platforms, you should use an external SQLite3 library with support for encryption.

bwilt
Posts: 15
Joined: Wed 07 Aug 2013 01:45

Re: SQLLite Android encrypt

Post by bwilt » Thu 27 Nov 2014 08:57

Oh, not such good news then. That puts a spanner in the works!

So does encryption work with static linking like you have for sqlite components or is that not supported under Android and IOS for that set as well ?

Is it possible to static link with unidac ?

I had looked through the docs expecting to see a mention that encryption didn't work on some platforms but couldn't find a mention of that but might have missed it.

I guess the encryption algorithm used in unidac wont work with an external library so I will need to encrypt with the external first, if I can find one.
Last edited by bwilt on Thu 27 Nov 2014 18:21, edited 1 time in total.

wbroyles10
Posts: 6
Joined: Tue 21 Aug 2012 00:56

Re: SQLLite Android encrypt

Post by wbroyles10 » Thu 27 Nov 2014 17:09

Devart,

I'm having the same issue. I want to take advantage of encryption and new features in found SQLite 3.8.

Why isn't direct mode supported on Andoid and iOS ?

Thanks

Wade

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: SQLLite Android encrypt

Post by AlexP » Mon 01 Dec 2014 09:14

Direct Mode is not supported in LiteDAC and UniDAC for Mac OS X and mobile platforms. Yes, encryption algorithms in the Direct mode can mismatch with the ones of external libraries.

We plat to support the Direct mode for the other platforms, but can't tell the exact implementation terms.

bwilt
Posts: 15
Joined: Wed 07 Aug 2013 01:45

Re: SQLLite Android encrypt

Post by bwilt » Mon 01 Dec 2014 21:28

Hi Alex,

Is there a web page that says for each provider and os platform whether direct mode is supported ?

I was wondering if one of the other local db multiplatform providers have direct mode and full database encryption ?

I have found that your encryption routines work on all platforms so as a workaround I have compressed some tables into a single row item and are using the EncryptTable function.

Not as clean a solution but it does work for my present needs.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: SQLLite Android encrypt

Post by AlexP » Thu 04 Dec 2014 09:18

This limitation is mentioned on the LiteDAC page. We have already added this information to the UniDAC page.
Such database file encryption behavior is supported in UniDAC only for SQLite and only on Windows.
Yes, this is one of encryption embodiments, while we haven't implemented native SQLite encryption.

Post Reply