I have a Monotouch app which uses a sqlite database. I want to encrypt the database so I am doing this:
_mainConnection = new SqliteConnection("Uri="+finalDB);
_mainConnection.Open();
_mainConnection.ChangePassword("mypassword");
However, its not working (on simulator and iphone). It gets this error:
at (wrapper managed-to-native) Mono.Data.Sqlite.UnsafeNativeMethods.sqlite3_rekey (intptr,byte[],int) <0x0005c> at (wrapper managed-to-native) Mono.Data.Sqlite.UnsafeNativeMethods.sqlite3_rekey (intptr,byte[],int) <0x0005c> at Mono.Data.Sqlite.SQLite3.ChangePassword (byte[]) <0x00053> at Mono.Data.Sqlite.SqliteConnection.ChangePassword (byte[]) <0x0004b> at Mono.Data.Sqlite.SqliteConnection.ChangePassword (string) <0x0005b>
Has anyone successfully used password protection on an sqlite database in Monotouch?