C# (Xamarin) - Clear Strings from memory and store it securely

Viewed 170

I am developing Xamarin applications (iOS + Android + common .NET Standard projects).

I collect sensitive data (strings) and want to:

  1. store it as secure as possible (not in storage, just in memory for some process)
  2. 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://docs.microsoft.com/en-us/dotnet/api/system.security.securestring?view=netstandard-2.0

So what is the best way to achieve that?

0 Answers
Related