2

I have an ios app in MonoTouch where i have to add encryption to my database. The database is created using sqlite-net libraries (https://github.com/praeclarum/sqlite-net). Is it possible to use Sqlcipher with sqlite-net?

The sample i found is using Ado.net. works fine.. How to integrate Sqlcipher with sqlite-net?

User382
  • 864
  • 19
  • 42

1 Answers1

0

SQLCipher for Xamarin has included support for sqlite-net. We show a usage example with sqlite-net in the Getting Started page.

Nisse Engström
  • 4,738
  • 23
  • 27
  • 42
Nick Parker
  • 1,378
  • 1
  • 7
  • 10
  • In case of Sqlite-net do i have to include "using Mono.Data.Sqlcipher;" I am little confused here.. Sqlcipher is the library to encrypt the sqlite database, correct? so when i am using sqlite-net i dont incluse Sqlcipher. I directly add support for using Mono.Data.Sqlite; Then add a password to my database. but dont know whether it is encrypting my database. If so what data encryption techniques (such as AES256) it is using ? – User382 Jul 18 '13 at 20:40
  • Nick again so if i have Sqlite-net then i dont have to include Sqlcipher libarary in the project? With Sqlite-net i will just add the password and it will encrypt the database for me? If it is true then what data encryption technique it is using??? – User382 Jul 19 '13 at 19:32
  • @mobiletest No, you would not include {using Mono.Data.Sqlcipher}. Instead, add the same assembly, but place {using SQLite;} at the top of your source file. Be sure to use the constructor that takes a password (e.g. {new SQLiteConnection (FilePath, Password)}). Then SQLCipher will automatically encrypt data, details on the encryption are available at http://sqlcipher.net/design/. You should be able to extract the database from the device / emulator to verify that the data is encrypted, as illustrated on the design page. – Stephen Lombardo Jul 22 '13 at 15:38
  • Thanks Stephen and Nick – User382 Jul 22 '13 at 15:46
  • @Nick Parker link has 404'd [here is a link it could have possibly been from google](http://components.xamarin.com/gettingstarted/sqlcipher-for-xamarin?version=2.1.1.4) – JKennedy Feb 16 '15 at 15:31