資源簡介
代碼片段和文件信息
using?System;
using?System.IO;
using?System.Security.Cryptography;
namespace?CSharpLibrary.StaticService
{
///?
///?DESCrypt?的摘要說明。
///?snipershen
///?DES加密解密類
///?xhshen@guanghua.sh.cn
///?2003/11/20
///?
public?sealed?class?DESCrypt
{
public?DESCrypt()
{
//
//?TODO:?在此處添加構造函數邏輯
//
}
//加密
//參數:strData:要加密的數據?strKey:密鑰
//返回:加好密的字符串
public?static?string?Encrypt(string?strData?string?strKey)?
{
string?strRtn;
try
{
DESCryptoServiceProvider?desc?=?new?DESCryptoServiceProvider();//des進行加密
byte[]?key?=?System.Text.Encoding.Unicode.GetBytes(strKey);
byte[]?data?=?System.Text.Encoding.Unicode.GetBytes(strData);
MemoryStream?ms?=?new?MemoryStream();//存儲加密后的數據
CryptoStream?cs?=?new
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2010-04-06?13:10??Ex16_03\
?????文件?????????910??2007-07-11?11:34??Ex16_03.sln
?????文件???????31744??2007-07-11?11:34??Ex16_03.suo
?????目錄???????????0??2010-04-06?13:10??Ex16_03\bin\
?????目錄???????????0??2010-04-06?13:10??Ex16_03\bin\Debug\
?????文件???????24576??2007-07-11?11:34??Ex16_03\bin\Debug\Ex16_03.exe
?????文件???????40448??2007-07-11?11:34??Ex16_03\bin\Debug\Ex16_03.pdb
?????文件????????5632??2007-07-11?11:34??Ex16_03\bin\Debug\Ex16_03.vshost.exe
?????文件????????2220??2007-07-11?11:34??Ex16_03\DESCrypt.cs
?????文件????????3461??2007-07-11?11:34??Ex16_03\Ex16_03.csproj
?????文件????????5780??2007-07-11?11:34??Ex16_03\Form1.cs
?????文件????????6623??2007-07-11?11:34??Ex16_03\Form1.Designer.cs
?????文件????????6017??2007-07-11?11:34??Ex16_03\Form1.resx
?????目錄???????????0??2010-04-06?13:10??Ex16_03\obj\
?????目錄???????????0??2010-04-06?13:10??Ex16_03\obj\Debug\
?????文件?????????842??2007-07-11?11:34??Ex16_03\obj\Debug\Ex16_03.csproj.GenerateResource.Cache
?????文件???????24576??2007-07-11?11:34??Ex16_03\obj\Debug\Ex16_03.exe
?????文件?????????180??2007-07-11?11:34??Ex16_03\obj\Debug\Ex16_03.Form1.resources
?????文件???????40448??2007-07-11?11:34??Ex16_03\obj\Debug\Ex16_03.pdb
?????文件?????????180??2007-07-11?11:34??Ex16_03\obj\Debug\Ex16_03.Properties.Resources.resources
?????目錄???????????0??2010-04-06?13:10??Ex16_03\obj\Debug\Refactor\
?????目錄???????????0??2010-04-06?13:10??Ex16_03\obj\Debug\TempPE\
?????文件????????4608??2007-07-11?11:34??Ex16_03\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll
?????文件?????????268??2007-07-11?11:34??Ex16_03\obj\Ex16_03.csproj.FileList.txt
?????文件?????????466??2007-07-11?11:34??Ex16_03\Program.cs
?????目錄???????????0??2010-04-06?13:10??Ex16_03\Properties\
?????文件????????1162??2007-07-11?11:34??Ex16_03\Properties\AssemblyInfo.cs
?????文件????????2836??2007-07-11?11:34??Ex16_03\Properties\Resources.Designer.cs
?????文件????????5612??2007-07-11?11:34??Ex16_03\Properties\Resources.resx
?????文件????????1103??2007-07-11?11:34??Ex16_03\Properties\Settings.Designer.cs
?????文件?????????249??2007-07-11?11:34??Ex16_03\Properties\Settings.settings
............此處省略4個文件信息
- 上一篇:C# access數據庫修復工具源碼
- 下一篇:C# 加密、解密文本文件
評論
共有 條評論