日期:2014-05-17 浏览次数:21035 次
private static Byte[] KEY_64
{
get
{
return new byte[] { 40, 52, 159, 81, 79, 137, 99, 82 };
}
}
private static Byte[] IV_64
{
get
{
return new byte[] { 98, 55, 32, 117, 156, 60, 59, 81 };
}
}
public static string EncryptCookie(string name)// DES加密 关键字、数据加密
{
//#region DES加密算法
if (name != "")
{
DESCryptoServiceProvider cryptoProvider = new DESCryptoServiceProvider();
MemoryStream ms = new MemoryStream();
CryptoStream cs = new
CryptoStream(ms, cryptoProvider.CreateEncryptor(KEY_64, IV_64), CryptoStreamMode.Write);
StreamWriter sw = new Stre