Decrypt string with Rijndael return “System.SecureString” (as a string) but not the string
问题 I'm using Rijndael Algorithm to encrypt strings (user passwords), but when I decrypt them, it returns me "System.SecureString", and not my decrypted password. I'm using this basic code: public static string DecryptString(string cipherText, string password) { byte[] key, iv; Rfc2898DeriveBytes rfcDb = new Rfc2898DeriveBytes(password, Encoding.UTF8.GetBytes(password)); key = rfcDb.GetBytes(16); iv = rfcDb.GetBytes(16); byte[] cipheredData = Convert.FromBase64String(cipherText); RijndaelManaged