Encrypting sensitive data in Flutter application

Viewed 88

In my Flutter app I have some sensitive data stored in a database. I want to do the following:

  1. When installing the app, encrypt the data and store it in database.
  2. Each time the app runs, retrieve the data from database and decrypt it.
    I looked at some Flutter encryption packages, and it looks like they will do the trick, however, my question is as follows:
    How do I safely store the encryption key between the runs of the app so a hacker won't be able to get them from the artifacts that are installed on Android or iOS device?
    Is flutter_secure_storage something designed for this specific task, or is there another way to do it?
    BTW, encrypting the whole database might be another option, but I don't see how to do it either - I use sqflite.
0 Answers
Related