Hi, I`m using sqlcipher with entityframework dbcontext and I have such code:
var Encrypted = “encrypted”;
var connection = new SqliteConnection($“Filename={plainTextDbPath}”);
connection.Open();
var command = connection.CreateCommand();
command.CommandText = $"ATTACH DATABASE '{encryptedDbPath}' AS plaintext KEY '{Password}';";
command.ExecuteNonQuery();
command.CommandText = $"SELECT sqlcipher_export('{Encrypted}');";
command.ExecuteNonQuery(); <---- fails here with 'unknown database encrypted'
command.CommandText = $"DETACH DATABASE {Encrypted};";
command.ExecuteNonQuery();
I cant undarstand what i
m missing.