不生成文件的流 一个解密文件的方法,它原本是解密时生成新的明文文件的,用的fileStream.但我不想生成明文文件.有没有什么流能够不用生成文件,只存在于内存中的..而且这个流能够用XmlDocument.Load读取的. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Crypt.DecryptFile2 MemoryStream fs = new MemoryStream(); // using (FileStream fs = new FileStream(sourceFile, FileMode.Create, FileAccess.ReadWrite)) //{ using (CryptoStream cs = new CryptoStream(fs, des.CreateDecryptor(btKey, btIV), CryptoStreamMode.Write)) { cs.Write(btFile, 0, btFile.Length); cs.FlushFinalBlock(); } //} return fs;doc=xmldocumentdoc.Load(Crypt.DecryptFile2(filePath, key, iv));执行到Load时提示 无法访问已关闭的流. WPF+WindowsFormsHost,置顶 为什么我的程序无法执行到断点处,见图 Log4Net在C#Winform中应用 Access转Oralce,一些问题考虑 application.exit如何关闭子线程 如何实现Undo Redo,? winform 下的DataGrid如何实现合并单元格? C#如何访问Php? 请教listbox绑定数据源的问题 如何调出ColorPicker NextResult()查询结果有两个数据集 但列数不一样 请问如何调整LISTVIEW的网格线粗细?
MemoryStream fs = new MemoryStream();
// using (FileStream fs = new FileStream(sourceFile, FileMode.Create, FileAccess.ReadWrite))
//{ using (CryptoStream cs = new CryptoStream(fs, des.CreateDecryptor(btKey, btIV), CryptoStreamMode.Write))
{
cs.Write(btFile, 0, btFile.Length);
cs.FlushFinalBlock();
} //}
return fs;
doc=xmldocumentdoc.Load(Crypt.DecryptFile2(filePath, key, iv));执行到Load时提示 无法访问已关闭的流.