This does the job:
Function DecryptFileToString(Type As String, ByVal strInputFile As String, strOutputFile As String, ByVal PW As String) As String
Dim Result As String = ""
Dim fsInput As System.IO.FileStream
fsInput = New System.IO.FileStream(strInputFile, FileMode.Open, FileAccess.Read)
Dim bytBuffer(4096) As Byte
Dim lngBytesProcessed As Long = 0
Dim lngFileLength As Long = fsInput.Length
Dim intBytesInCurrentBlock As Integer
Dim csCryptoStream As CryptoStream = Nothing
Dim CrType1 As New System.Security.Cryptography.RijndaelManaged
Dim bytKey1 As Byte()
Dim bytIV1 As Byte()
bytKey1 = CreateKey(PW)
bytIV1 = CreateIV(PW)
Select Case Type
Case "S"
CrType1.Padding = PaddingMode.PKCS7
Dim fsOutput As MemoryStream
fsOutput = New MemoryStream()
fsOutput.SetLength(0)
csCryptoStream = New CryptoStream(fsOutput, CrType1.CreateDecryptor(bytKey1, bytIV1), CryptoStreamMode.Write)
While lngBytesProcessed < lngFileLength
intBytesInCurrentBlock = fsInput.Read(bytBuffer, 0, 4096)
csCryptoStream.Write(bytBuffer, 0, intBytesInCurrentBlock)
lngBytesProcessed = lngBytesProcessed + CLng(intBytesInCurrentBlock)
End While
csCryptoStream.FlushFinalBlock()
fsOutput.Close()
Result = Encoding.UTF8.GetString(fsOutput.ToArray())
Case "F"
Dim fsOutput As System.IO.FileStream
fsOutput = New System.IO.FileStream(strOutputFile, FileMode.OpenOrCreate, FileAccess.Write)
fsOutput.SetLength(0)
csCryptoStream = New CryptoStream(fsOutput, CrType1.CreateDecryptor(bytKey1, bytIV1), CryptoStreamMode.Write)
While lngBytesProcessed < lngFileLength
intBytesInCurrentBlock = fsInput.Read(bytBuffer, 0, 4096)
csCryptoStream.Write(bytBuffer, 0, intBytesInCurrentBlock)
lngBytesProcessed = lngBytesProcessed + CLng(intBytesInCurrentBlock)
End While
csCryptoStream.Close()
fsOutput.Close()
Result = File.ReadAllText(strOutputFile)
End Select
fsInput.Close()
Return Result
End Function