2

I want to change a password (add new password) sqlite db for android in Visual Studio using Xamarin.Android. I do not want to buy commercial encrypting packages like sqlcipher. Please help with the bug or suggest a different way to encrypt the sqlite db for android.

I am referencing Mono.Data.Sqlite. Exception thrown when call ChangePassword after Open is called.

private static SqliteConnection GetConnection(string dbPath)
{
    var conn = new SqliteConnection("Data Source=" + dbPath);

    var connString = "Data Source=" + dbPath + ";Password=Mypass;";
    conn = new SqliteConnection(connString);
    conn.Open();
    conn.ChangePassword("Mypass");
    conn.Close();

    return conn;
} 

0 Answers0