How to secure string value in memory from capture by reverse engineering, such as a password or sensitive data.
Asked
Active
Viewed 49 times
0
-
1you can just encrypt it and decrypted it when you need it – Stanly Mar 22 '23 at 05:52
-
@Stanly What about the encryption key?? It needs to protection in memory too, so this solution not useful – Mahmoud Khalid Mar 22 '23 at 05:57
-
Also see: https://stackoverflow.com/q/68948859/ – jamesdlin Mar 22 '23 at 08:23
1 Answers
0
If you use a string (or any other value) in Dart, there is no way to guarantee its erasure from memory.
Dart is a garbage-collected language, and decides on its own when to dispose of data. The language specification does not describe any way to ensure that sensitive data is cleared from memory.

hacker1024
- 3,186
- 1
- 11
- 31