首页 > 解决方案 > 如何在 Flutter 中加密 SQLite 数据库?

问题描述

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

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;
  }

标签: flutterflutter-layoutsqlcipherflutter-dependencies

解决方案


Pointy Castle似乎是目前首选的加密库。


推荐阅读