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

Decrypt() public static method

Rozszyforwywuje łańcuch znaków
public static Decrypt ( this encryptedData ) : SecureString
encryptedData this
return System.Security.SecureString
        public static SecureString Decrypt(this string encryptedData)
        {
            try
            {
                byte[] decryptedData = System.Security.Cryptography.ProtectedData.Unprotect(
                    Convert.FromBase64String(encryptedData),
                    entropy,
                    System.Security.Cryptography.DataProtectionScope.CurrentUser);
                return ToSecureString(Encoding.Unicode.GetString(decryptedData));
            }
            catch
            {
                return new SecureString();
            }
        }