Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Storing user data securely in Flutter and Dart

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?

like image 917
123432198765 Avatar asked Nov 17 '25 02:11

123432198765


2 Answers

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.

like image 151
Alberto Miola Avatar answered Nov 18 '25 20:11

Alberto Miola


I dont think you need to encrpyt before you send it to firestore.. As long as you set your firestore rules well it would be ok

like image 20
Jesus Loves You Avatar answered Nov 18 '25 19:11

Jesus Loves You