/// <summary> /// Decrypts the specified <see cref="EncryptionResult" /> object using the <see /// cref="RijndaelManaged" /> encryption algorithm. /// </summary> /// <param name="input">The <see cref="EncryptionResult" /> object to decrypt.</param> /// <param name="key">The encryption key.</param> public static byte[] Decrypt(EncryptionResult input, byte[] key) { return(Decrypt(input?.EncryptedData, key, input?.Seed)); }
/// <summary> /// Decrypts the specified <see cref="EncryptionResult" /> object. /// </summary> /// <typeparam name="TAlgorithm">The encryption algorithm to use.</typeparam> /// <param name="input">The <see cref="EncryptionResult" /> object to decrypt.</param> /// <param name="key">The encryption key.</param> public static byte[] Decrypt <TAlgorithm>(EncryptionResult input, byte[] key) where TAlgorithm : SymmetricAlgorithm { return(Decrypt <TAlgorithm>(input?.EncryptedData, key, input?.Seed)); }