如何在Flutter中加密SQLite数据库? [英] How to encrypt the SQLite database in Flutter?

查看:575
本文介绍了如何在Flutter中加密SQLite数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过以下代码在Flutter中创建数据库,有什么方法可以加密数据库?

I am creating a database in Flutter by the following code, is there any way we can encrypt the database?

是否有Flutter可用的库?

Is there any library available for Flutter?

initDb() async {
    io.Directory documentsDirectory = await getApplicationDocumentsDirectory();
    String path = join(documentsDirectory.path, "test.db");
    var theDb = await openDatabase(path, version: 1, onCreate: _onCreate);
    return theDb;
  }

推荐答案

Pointy Castle 似乎成为目前选择的加密库.

Pointy Castle seems to be the encryption library of choice at the moment.

这篇关于如何在Flutter中加密SQLite数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆