I am developing Xamarin applications (iOS + Android + common .NET Standard projects).
I collect sensitive data (strings) and want to:
- store it as secure as possible (not in storage, just in memory for some process)
- clear it from memory when some conditions is met
At first SecureString looked perfect for me, but I found that:
We don't recommend that you use the SecureString class for new development. For more information, see SecureString shouldn't be used on GitHub.
https://learn.microsoft.com/en-us/dotnet/api/system.security.securestring?view=netstandard-2.0
So what is the best way to achieve that?