1

I'm trying to use a database for my application which is a sqflite. Since my application is offline and my data stored in database is important I'm looking for a way to password protect the database to prevent it to reveal data after decompiling the APK. So here is a couple of questions that may clarify what I'm trying to achieve:

  1. Is it possible to password protect a sqflite db? How?
  2. What database do you suggest for an offline flutter app which is fast and secure?
  3. How to secure that database from spoiling?

Answering to any of the above questions is appreciated.

Community
  • 1
  • 1
Taba
  • 3,850
  • 4
  • 36
  • 51

1 Answers1

1

Edit: so after your comment, SQL cipher should answer your question 2. However for question 1: Use this package to encrypt the file: aes-encrypt

Sample code is here: Encrypt File in Flutter

_

This maybe what you need SQLCipher

However this doesn't support iOS as yet.

Mohammad Assad Arshad
  • 1,535
  • 12
  • 14
  • thanks for your answer but my database is preset and I'm just trying to read it's data in the app. – Taba Jun 04 '20 at 12:29