Page 1 of 1
Using SQLiteCrypt
Posted: Wed 14 Aug 2013 18:32
by imre.dudas
Hello,
How can I exactly use the SQLiteCrypt with Devart? I mean where should i exchange SQLite3.dll so that it would work properly also in Entity Developer ? Where do i need to write my license code I got to SQLiteCrypt? How is it possible to encode an existing database with it?
I couldn't find any description about these.
Thank you:
Imre
Re: Using SQLiteCrypt
Posted: Fri 16 Aug 2013 14:50
by Pinturiccio
dotConnect for SQLite supports only SEE, CEROD and SQLiteCrypt encryption. However our provider requires the corresponding extension itself to work with encrypted database, and it these extensions are not provided with dotConnect for SQLite.
For more information, please refer to
http://www.devart.com/dotconnect/sqlite ... nMode.html
imre.dudas wrote:How can I exactly use the SQLiteCrypt with Devart? I mean where should i exchange
SQLite3.dll...
Where do i need to write my license code I got to SQLiteCrypt?
Recently SQLiteCrypt API has changed. We have updated our product; the updates will be included in the next build of dotConnect for SQLite. We will post here when the corresponding build of dotConnect for SQLite is available for download.
In the new build the SQLiteCryptLicenseKey connection string parameter for the SQLiteCrypt license key is added. You need to set the EncryptionMode, Password, SQLiteCryptLicenseKey connection string parameters in order to work with a SQLiteCrypt encrypted database.
imre.dudas wrote:How is it possible to encode an existing database with it?
SQLiteConnection has the ChangePassword method. Set the new password with this method and the database will be encrypted.
Re: Using SQLiteCrypt
Posted: Tue 03 Sep 2013 23:22
by ashleysbuss
Sirs,
Do you have any idea of when this wonderful extra functionality will be ready for prime time?
Thanks,
Ashley
Re: Using SQLiteCrypt
Posted: Wed 04 Sep 2013 00:48
by imre.dudas
Thank you, great.
Re: Using SQLiteCrypt
Posted: Wed 04 Sep 2013 12:10
by Pinturiccio
We are planning to release the next public build of dotConnect for SQLite at the end of this week.
Re: Using SQLiteCrypt
Posted: Wed 04 Sep 2013 13:28
by ashleysbuss
Support,
Thank you for the reply and I look forward to testing over the weekend.
Take care,
Ashley
Re: Using SQLiteCrypt
Posted: Fri 06 Sep 2013 08:27
by Pinturiccio
The new build of dotConnect for SQLite 4.6.322 is available for download now!
It can be downloaded from
http://www.devart.com/dotconnect/sqlite/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to
http://forums.devart.com/viewtopic.php?t=27872
Re: Using SQLiteCrypt
Posted: Wed 11 Sep 2013 18:06
by udayr
Hi Devart Team,
Thanks for the new release (We have most recent version). We recently bought the dotConnect for SQLite Professional version and and are trying to encrypt the database with SQLiteCrypt.
We also bought the SQLiteCrypt license and are trying to encrypt a SQLite database with the same.But the database does not encrypt.
below is the connectionstring I am using..
metadata=res://*/SessionDBModel.csdl|res://*/SessionDBModel.ssdl|res://*/SessionDBModel.msl;provider=Devart.Data.SQLite;provider connection string='Data Source=filenamehere;FailIfMissing=False;Password=passwordhere;Encryption=SQLiteCrypt;SQLiteCrypt License Key=00000-000-0000000-00000'
I am able to create any new database with the above connection string but can not get the encryption to work.
Any help /suggestions on what I might be missing here?
Thank You,
Uday
Re: Using SQLiteCrypt
Posted: Fri 13 Sep 2013 08:26
by Pinturiccio
udayr wrote:I am able to create any new database with the above connection string but can not get the encryption to work.
Any help /suggestions on what I might be missing here?
There can be several possible reasons of such issue:
1. Please make sure that your application uses the sqlite3.dll library built with SQLiteCrypt. When installing dotConnect for SQLite, the sqlite3.dll in the System32 folder is overwritten.
2. The Open method of SQLiteConnection does not encrypt the database. It allows to open a database, and if it is encrypted, The 'Password', 'Encryption' and 'SQLiteCrypt License Key' connection string parameters are used to open the encrypted database. To encrypt the database, you need to use the ChangePassword method. For more information, please refer to
http://www.devart.com/dotconnect/sqlite ... sword.html
Here is the example that encrypts the database and allows you to check that the database was encrypted.
Code: Select all
SQLiteConnection conn = new SQLiteConnection("Data Source=C:\\Temp\\database8.db;Encryption=SQLiteCrypt;FailIfMissing=false;pooling=false");
conn.Open();
conn.ChangePassword("test");
conn.Close();
conn = new SQLiteConnection("Data Source=C:\\Temp\\database8.db;Encryption=SQLiteCrypt;FailIfMissing=false;Password=test;pooling=false");
conn.Open();
conn.Close();
conn = new SQLiteConnection("Data Source=C:\\Temp\\database8.db;Encryption=SQLiteCrypt;FailIfMissing=false;Password=wrongpsw;pooling=false");
conn.Open();
conn.Close();
If SQLiteCrypt works correctly, this code raises the "File opened that is not a database file. file is encrypted or is not a database" exception when calling Open method the third time.
Re: Using SQLiteCrypt
Posted: Mon 16 Sep 2013 20:16
by udayr
Pinturiccio wrote:
1. Please make sure that your application uses the sqlite3.dll library built with SQLiteCrypt. When installing dotConnect for SQLite, the sqlite3.dll in the System32 folder is overwritten.
I made sure that the my application is using the Sqlite3.dll the added to system32 folder on installing the dotConnect for SQlite
Pinturiccio wrote:
2. The Open method of SQLiteConnection does not encrypt the database. It allows to open a database, and if it is encrypted, The 'Password', 'Encryption' and 'SQLiteCrypt License Key' connection string parameters are used to open the encrypted database. To encrypt the database, you need to use the ChangePassword method. For more information, please refer to
http://www.devart.com/dotconnect/sqlite ... sword.html
I following your example and it DID NOT work. Below is the code I am using with slight modification connection strings (add SQLiteCrypt License Key Parameter)
Code: Select all
SQLiteConnection conn = new SQLiteConnection("Data Source=C:\\Temp\\NewSessionDB;Encryption=SQLiteCrypt;SQLiteCrypt License Key=00000-000-0000000-00000;FailIfMissing=false;pooling=false");
conn.Open();
conn.ChangePassword("test");
conn.Close();
conn = new SQLiteConnection("Data Source=C:\\Temp\\NewSessionDB;Encryption=SQLiteCrypt;SQLiteCrypt License Key=00000-000-0000000-00000;FailIfMissing=false;Password=test;pooling=false");
conn.Open();
conn.Close();
conn = new SQLiteConnection("Data Source=C:\\Temp\\NewSessionDB;Encryption=SQLiteCrypt;SQLiteCrypt License Key=00000-000-0000000-00000;FailIfMissing=false;Password=wrongpsw;pooling=false");
conn.Open();
conn.Close();
The code is executed with no errors and the database is not encrypted.
I am not sure what I am missing here. Encryption with the SQLiteCrypt is the sole reason we purchase dotConnect for SQLite and we are struck here not able decide if should move forward using dotConnect.
Please advice.
Thank You
Re: Using SQLiteCrypt
Posted: Mon 16 Sep 2013 22:29
by udayr
We also tested the sample App with an 'Invalid SQLiteCrypt License Key' and it yielded the same result as with a 'Valid SQLiteCrypt License Key'.
Here is the Invalid Key we used : 00000-000-0000000-00000
How is the SQLiteCrypt key validated? We purchased a key from SQLiteCrypt (
http://sqlite-crypt.com/) and using the key they provided.
Please help.
Re: Using SQLiteCrypt
Posted: Wed 18 Sep 2013 14:52
by Pinturiccio
We have answered you via e-mail.