StringExtensionsToUnsecureString Method
Converts the given SecureString into a String.
Namespace: Gemstone.StringExtensionsAssembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
public static string? ToUnsecureString(
this SecureString? value
)
<ExtensionAttribute>
Public Shared Function ToUnsecureString (
value As SecureString
) As String
public:
[ExtensionAttribute]
static String^ ToUnsecureString(
SecureString^ value
)
Gemstone.StringExtensions.StringExtensions.ToUnsecureString = function(value);
- value SecureString
- The SecureString to be converted.
StringThe given
SecureString as a
String.In Visual Basic and C#, you can call this method as an instance method on any object of type
SecureString. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This method is not safe, as it stores your secure string data in clear text in memory.
Since strings are immutable, that memory cannot be cleaned up until all references to
the string are removed and the garbage collector deallocates it. Only use this method
to interface with APIs that do not support the use of SecureString for
sensitive text data.