I have the commercial copy of SqlCipher.dll for MonoTouch and Android. I have included a reference to sqlcipher.dll in my project and I can create a connection and open my encrypted database in my C# code.
I can use code like this:
private SqliteConnection GetConnection(String databaseName, String password)
{
var databasePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), databaseName);
return new SqliteConnection(String.Format("Data Source={0};Password={1}", databasePath, password));
}
But I cannot use code like this which is referenced here
http://sqlcipher.net/sqlcipher-api/#key:
sqlite3_key(database, "test123", 7);
if (sqlite3_exec(database, "SELECT count(*) FROM sqlite_master;", NULL, NULL, NULL) == SQLITE_OK) {
// key is correct.
} else {
// key is incorrect
}
sqlite3_key does not seem to be available
I would like to use sqlite3_key within the Xamarin project in C# code. Am I missing a reference call ?
Any help would be greatly appreciated