I have integrated sqlcipher in xamarin iOS app.
I continuously getting error “Mono.Data.Sqlcipher.SqliteExceptionFile opened that is not a database file file is encrypted or is not a database”
Refer My Code Snippet
if (me.connection == null) {
me.connection = new SqliteConnection ("Data Source=" + dbLocation);
SqliteConnection.SetConfig (SQLiteConfig.Serialized);
me.connection.SetPassword ("");
me.connection.SetPassword (Context.KeychainKey); // Password stored in keychain
me.connection.Open ();
} else if (me.connection.State == System.Data.ConnectionState.Closed) {
me.connection = new SqliteConnection ("Data Source=" + dbLocation);
SqliteConnection.SetConfig (SQLiteConfig.Serialized);
me.connection.SetPassword ("");
me.connection.SetPassword (Context.KeychainKey);
me.connection.Open ();
}
at Mono.Data.Sqlcipher.SQLite3.Prepare (Mono.Data.Sqlcipher.SqliteConnection cnn, System.String strSql, Mono.Data.Sqlcipher.SqliteStatement previous, UInt32 timeoutMS, System.String& strRemain) [0x00000] in :0
at Mono.Data.Sqlcipher.SqliteCommand.BuildNextCommand () [0x00000] in :0
Any Help Highly appreciated.