Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,377 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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.
If you use sqlite-net
you can use sqlcipher