发热数据程序上报.zip
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
主要对XML文件进行加解密。保护重要信息(数据库连接账户和密码等配置信息) //解密XML文件 public static XmlDocument ReadFileXML(string mFilePath) { XmlDocument xmlDoc = new XmlDocument(); try { xmlDoc.PreserveWhitespace = true; xmlDoc.Load(mFilePath); } catch (Exception err) { return xmlDoc; } // Create a new TripleDES key. TripleDESCryptoServiceProvider tDESkey = new TripleDESCryptoServiceProvider(); tDESkey.Key = Convert.FromBase64String(Common.customKey); tDESkey.IV = Convert.FromBase64String(Common.customIV); tDESkey.Mode = CipherMode.ECB; tDESkey.Padding = PaddingMode.PKCS7; try { // Encrypt the "creditcard" element. // Common.Encrypt(xmlDoc, "Config", tDESkey); //Console.WriteLine("Encrypted XML:"); //Console.WriteLine(xmlDoc.OuterXml); //xmlDoc.Save(filePath); Common.Decrypt(xmlDoc, tDESkey); Console.WriteLine("Decrypted XML:"); Console.WriteLine(xmlDoc.OuterXml); //xmlDoc.Save(mFilePath); //读XML文件 } catch (Exception err) { //Console.WriteLine(e.Message); } finally { tDESkey.Clear(); } return xmlDoc; } //加密XML public static bool WriteFileXML(string mFilePath) { bool success = true; XmlDocument xmlDoc = new XmlDocument(); try { xmlDoc.PreserveWhitespace = true; xmlDoc.Load(mFilePath); } catch (Exception err) { success = false; return false; }
- 粉丝: 0
- 资源: 5
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 常用工具集参考用于图像等数据处理
- 音乐展示网页、基于Stenography的图像数字水印添加与提取,以及基于颜色矩和Tamura算法的图像相似度评估算法py源码
- 基于EmguCV(OpenCV .net封装),图像数字水印加解密算法的实现,其中包含最低有效位算法,离散傅里叶变换算法+文档书
- 基于matlab+DWT的图像水印项目,数字水印+源代码+文档说明+图片+报告pdf
- (优秀毕业设计)基于python实现的数字图像可视化水印系统的设计与实现,多种数字算法实现+源代码+文档说明+理论演示pdf
- 基于DWT-DCT-SVD和deflate压缩的数字水印方法python源码+Gui界面+演示视频(高分毕业设计)
- 基于matlab实现DWT、DCT、SVD算法数字图像水印可视化系统+GUI界面+文档说明+详细注释(高分毕业设计)
- NCIAE-Data-Structure大一大二笔记
- 学习wireshark笔记
- digital-image-数据可视化笔记