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?
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.
Related Questions
- → How do you create a 12 or 24 mnemonics code for multiple cryptocurrencies (ETH, BTC and so on..)
- → Flutter: input text field don't work properly in a simple example..... where am I wrong?
- → Can I customize the code formatting of Dart code in Atom?
- → Is it possible to develop iOS apps with Flutter on a Linux virtual machine?
- → Display SnackBar in Flutter
- → JSON ObjectMapper in Flutter
- → Material flutter app source code
- → TabBarSelection No such method error
- → How do I set the animation color of a LinearProgressIndicator?
- → Add different routes/screens to Flutter app
- → Is there a way to get the size of an existing widget?
- → How to share a file using flutter
- → Is there an easy way to find particular text built from RichText in a Flutter test?