3

I have created an encrypted SQLite database using C# EntityFramework but I'm not able to open it using DB Browser for SQLite

DB Browser for SQLite is updated at the latest version 3.11 and I'm using DB Browser (SQLCipher)

using System.Data.SQLite;

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{

    var conn = new System.Data.SQLite.SQLiteConnection(@"Data Source=mySQLite.db;");

    var command = conn.CreateCommand();
    command.CommandText = "PRAGMA key = 'password'";

    command.ExecuteNonQuery();

    optionsBuilder.UseSqlite(conn);
}

SQLCipher password request

Does C# and related SQLCipher library use a specific configuration? How to tune C# code to open the database with DB Browser? Are there specific parameters to use (e.g. SQLite version, page size, kdf iteration, hmac and kdf algos)? I have read the documentation but with no success.

Cyr
  • 431
  • 1
  • 6
  • 18
  • Could you be more specific than `I'm not able to open it`? What errors and output (if any) are you getting? Have you verified that the "SQLCipher 4 defaults" settings are indeed correct? – grooveplex Feb 08 '19 at 23:47
  • 1
    @grooveplex I know that my question look like "i'm not able to open it" but that's the point: DB Browser doesn't open it! Pushing the OK button SQLCipher reload the same window asking me the password. The question is: does C# and related SQLCipher library use a specific configuration? I think yes but I don't know how to tune C# code to open the database with DB Browser. I have read the [documentation](https://www.zetetic.net/sqlcipher/sqlcipher-api/#key) but with no success. – Cyr Feb 09 '19 at 09:15
  • Which C# library did you use for create the sqlite database? If it is System.Data.SQLite you can't open it with SQLCipher driver. – EduBic Feb 11 '21 at 08:46
  • Is [tag:db-browser-sqlite] the same as [tag:sqlite-browser]? – surfmuggle Dec 15 '22 at 16:27

0 Answers0