xamarin.forms encrypt sqlite db file

drdmohssine 26 Reputation points
2021-02-23T14:07:51.31+00:00

I'm new to this platform, and I hop
is there any way to encrypt the SQLite database;
I search on the internet but didn't found helpful results.
I found this blog
https://www.bricelam.net/2016/06/13/sqlite-encryption.html
but I don't know how to implement it in my project.

this is my code

using Microsoft.EntityFrameworkCore;
using Xamarin.Forms;

namespace BoardEntitiesClassLib
{
    public class BoardDBContextEntities : DbContext
    {

        public const string DatabaseName = "Boards.db3";

        public BoardDBContextEntities()
        {
            SQLitePCL.Batteries_V2.Init();

            this.Database.Migrate();

        }


        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {

            string databasPath;

            databasPath = DependencyService.Get<IPath>().GetDatabasePath(DatabaseName);
            optionsBuilder
                .UseSqlite($"Filename={databasPath}");

        }

    }

}

Sorry about my English.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,312 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,067 questions
0 comments No comments
{count} vote

0 additional answers

Sort by: Most helpful