简体   繁体   English

如何保护 sqflite 数据库 Flutter?

[英]how to secure sqflite database Flutter?

I wonder if sqflite package in flutter is secure and hidden in the devices?我想知道颤振中的 sqflite 包是否安全并隐藏在设备中?

I could see sqflite database in my ios device in path: Files -> Browse -> Locations section -> On my iPhone -> AppName -> db_name.db我可以在我的 ios 设备的路径中看到 sqflite 数据库:文件 -> 浏览 -> 位置部分 -> 在我的 iPhone 上 -> AppName -> db_name.db

I found the database I created in the path above, and I think every one can edit, it's a big problem.我在上面的路径中找到了我创建的数据库,我认为每个人都可以编辑,这是一个大问题。 So how to hide/encrypt the database in devices?那么如何隐藏/加密设备中的数据库呢?

Best regards此致

You can usethis package你可以使用这个包

https://pub.dev/packages/sqflite_sqlcipher https://pub.dev/packages/sqflite_sqlcipher

And set a password to accessthe db content并设置密码访问数据库内容

import 'package:sqflite_sqlcipher/sqflite.dart';

Database db = await openDatabase(
  path,
  password: "my password",
  // onCreate, onUpgrade...
);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM