I cannot find many document for Mono.Data.Sqlcipher.dll. I basically want to encrypt a unencrypted SQLite file (downloaded from server). in android /ios devices using Xamarin.
To encrypt a plain text SQLite database using SQLCipher, you will want to integrate the usage of the sqlcipher_export(…) into your application, specifically you will want to review example #1.
I don’t know if this is the right place, but the current way of single Mono.Data.Sqlcipher dll package isn’t very useful when using SQLite.net syntax in cross platform Xamarin development. As Model will normally be PCL in this case and shared by all other projects. I will need at very least, have the Table/ColumnAttribute Class in a separate PCL library .
Another minor issue with SQLite.net syntax is all the CancellationToken parameters are removed.
I’m glad to hear you have made progress with the migration. At this time we do not have a PCL version of SQLCipher for Xamarin, however it is something we are considering in the future. Thank you for your feedback.
it works fine on debug version of my android application, It generates a file of size 871K and it can be late opened /queried with SqliteCommand.
if I build a release version and run it, it will generate a file of size 1.2M, and will freeze when do SqliteCommand.executeReader.(Note it gets passed the SQLiteConnection open with key stuff, which it is not totally correptted)