Page 1 of 1

Encrypted SQLite, Cipher

Posted: Fri 08 May 2020 12:51
by AlexGray
Hi,
I am trying to connect to an SQLite database that is encrypted with SQLCipher 4 with its default settings trough UniDac 8.1.3. But I am not able to open the database, so is there any step-by-step guide to accomplish that or can you please provide some guidelines?
BTW. The password Is correct and the database is valid, I’m able to work with it from e.g. “DB Browser for SQLite”

Thanks!

Re: Encrypted SQLite, Cipher

Posted: Tue 26 May 2020 07:00
by MaximG
We have tested UniDAC SQLCipher 3. In order to use encryption implemented in a third-party client library (including SQLCipher), you should specify the encryption key value in the EncryptionKey property and set the EncryptionAlgorithm property to leDefault, for example:

Code: Select all

UniConnection.Database := '<your SQLite DB file>';
UniConnection.SpecificOptions.Values['ClientLibrary'] := '<your client library with encryption support>';
UniConnection.SpecificOptions.Values['EncryptionAlgorithm'] := 'leDefault';
UniConnection.SpecificOptions.Values['EncryptionKey'] := '<your EncryptionKey value>';
UniConnection.Connect;
If you use a client library that supports SQLCipher 3.4.2 or older, you should specify your license key in the CipherLicense property:

Code: Select all

UniConnection.SpecificOptions.Values['CipherLicense'] := '<your Cipher License>';

We will test our components with SQLCipher 4 and let you know the results.

Re: Encrypted SQLite, Cipher

Posted: Wed 17 Jun 2020 07:44
by AlexGray
MaximG,

I just want to confirm that it works.
Thank you!