The guy Securestring is described by the documentation as follows:
Represents text that should be kept confidential. It is encrypted to
privacy when it is being used, and erased from the memory of
computer when no longer needed.
This type implements the interface IDisposable
and it is through the method Dispose
indicating that it must be deleted from the memory.
Several. NET classes that handle passwords, including the WPF Passwordbox, include methods or properties using this class.
The purpose of this class is to prevent passwords from being stored on disk (swap) and make it more difficult (though not impossible) for an attacker with access to computer memory to find out what the password value is.
Of course, this class is only interested if the password never even becomes available as a string
or byte[]
conventional.
Also relevant: https://stackoverflow.com/questions/141203/when-would-i-need-a-securestring-in-net (in English)
http://msdn.microsoft.com/en-us/library/system.security.securestring%28v=vs.110%29.aspx
– luiscubal
@luiscubal I just saw this guy. If you have experience with this guy and can answer the two other questions, I will be grateful.
– André Leria