Encrypting databases with SQLCipher

Encryption adds another level of security to our apps and data. If we have an app that contains sensitive information, such as passwords or confidential data, then encryption can help protect this data.

How to do it...

Adding encryption to our apps is as simple as adding a reference and creating a password or encryption key. Let's take a look at the following steps:

  1. Remove the Mono.Data.Sqlite reference if you are using ADO.NET, the SQLite.NET component, or the NuGet package if we are using SQLite.NET.
  2. Add the SQLCipher Android component to the project from the Xamarin Component Store. This can be done by right-clicking on the Components folder under the project. In the dialog that appears, we can search for SQLCipher ...

Get Xamarin Mobile Development for Android Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.