Ad

Storing User Data Securely In Flutter And Dart

- 1 answer

Suppose I have a notes app where I need to store user's notes securely. Can I store the notes in a plaintext format in an sqlite database? Or should they be encrypted locally as well?

Also should I encrypt it before I send it to the Firestore database? I've looked into the encrypt package but it's difficult to understand. Are there any good tutorials for this?

If I should encrypt, what type of encryption should I use?

Ad

Answer

Consider the usage of hive, which is a very popular NoSQL database for Dart and Flutter which automatically does a strong encryption of the data.

It's also used by the hydrated_bloc for example and other packages.


In general, you shouldn't implement encryption/decryption logic by yourself. Use well-known libraries (such as hive) which just does the work for you.

Ad
source: stackoverflow.com
Ad