using System;
using System
using System
namespace Vavic
{
/// <summary>
/// Security 的摘要說明
/// </summary>
public class Security
{
const string KEY_
const string IV_
public Security()
{
//
// TODO: 在此處添加構造函數邏輯
//
}
public static string Encode(string data)
{
byte[] byKey = System
byte[] byIV = System
DESCryptoServiceProvider cryptoProvider = new DESCryptoServiceProvider();
int i = cryptoProvider
MemoryStream ms = new MemoryStream();
CryptoStream cst = new CryptoStream(ms
StreamWriter sw = new StreamWriter(cst);
sw
sw
cst
sw
return Convert
}
public static string Decode(string data)
{
byte[] byKey = System
byte[] byIV = System
byte[] byEnc;
try
{
byEnc = Convert
}
catch
{
return null;
}
DESCryptoServiceProvider cryptoProvider = new DESCryptoServiceProvider();
MemoryStream ms = new MemoryStream(byEnc);
CryptoStream cst = new CryptoStream(ms
StreamReader sr = new StreamReader(cst);
return sr
}
}
}
From:http://tw.wingwit.com/Article/program/net/201311/11773.html