0

Help guys,

I have an sqlite database with a custom encryption using v1.0.106 sqlite from NuGet Package Manager. This database generated a customDB.sqlite.password. I created a tool (.NET47 project using VS2022) that will open the database. But the problem now is, there's an Exception in the command Open() command. The available version that I can see in NuGet package manager is v1.0.115 or higher which I used in my project.

     Connection = new SQLiteConnection(String.Format("Data Source={0};Password={1}", database, password));
     Connection.Open();

Here's the error:

    System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Data.SQLite.SEE.License, Version=1.0.116.0, Culture=neutral, PublicKeyToken=433d9874d0bb98c5' or one of its dependencies. The system cannot find the file specified.'

I don't see the package System.Data.SQLite v1.0.112 or lower. I must not change the database and its encryption because this has been rolled out years ago. Is there way to decrypt the database using the newest System.Data.SQLite without changing the encryption? Or is there way to use the older version in my new project?

It's related to this link: Does the latest version of System.Data.Sqlite not support password encryption?

  • Supposedly this is an old and unsupported codec and you have to downgrade your dependencies https://sqlite.org/forum/info/ca910d2f0d4e45c8 – zaitsman Oct 26 '22 at 01:03
  • 1
    SQLite encryption is applied at the connection level at the time the DB file is created. So it is a once and forever thing; you cannot layer another encryption over the old. YOu could export/backup the data, create a new DB with a stable and widely supported encrption scheme and realod the data into it. – Ňɏssa Pøngjǣrdenlarp Oct 26 '22 at 01:13
  • @zaitsman: How to downgrade the dependencies? I just added that nuget package but it found an inner exception in the Connection string`EntryPointNotFoundException: Unable to find an entry point named 'sqlite3_config' in DLL 'SQLite.Interop.dll'.` I used the `SQLite.Interop.dll` in the package v1.0.122. – Marcus Aurelius Oct 26 '22 at 01:52

0 Answers0