BlipFace.Helpers.ProtectionHelper.ToInsecureString C# (CSharp) Method

ToInsecureString() public static method

Przekształca SecureString do zwykłego stringa
public static ToInsecureString ( this input ) : string
input this bezpieczny łańcuch znaków
return string
        public static string ToInsecureString(this SecureString input)
        {
            string returnValue = string.Empty;
            IntPtr ptr = System.Runtime.InteropServices.Marshal.SecureStringToBSTR(input);
            try
            {
                returnValue = System.Runtime.InteropServices.Marshal.PtrToStringBSTR(ptr);
            }
            finally
            {
                System.Runtime.InteropServices.Marshal.ZeroFreeBSTR(ptr);
            }
            return returnValue;
        }