Click or drag to resize

StringExtensionsToUnsecureString Method

Converts the given SecureString into a String.

Namespace: GSF
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.218-beta+101eee949414e414795e55a6e73d88938f0177b8
Syntax
public static string ToUnsecureString(
	this SecureString value
)
View Source

Parameters

value  SecureString
The SecureString to be converted.

Return Value

String
The given SecureString as a String.

Usage Note

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).
Remarks
This method is UNSAFE, 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.
See Also