使用微软企业库-加密
using Microsoft.Practices.EnterpriseLibrary.Security.Cryptography;
/// <summary>
///使用微软企业库-加密
/// </summary>
public class EnterpriseCrypt
{
/// <summary>
/// 加密
/// </summary>
/// <param name="id"></param>
/// <param name="name"></param>
public void CryptUpdateDept(int id, string name)
{
string CryptName = Cryptographer.EncryptSymmetric("symmProvider", name);
}
/// <summary>
/// 解密
/// </summary>
/// <param name="CryptName"></param>
public void DeCryptGetDept(string CryptName)
{
string DeCryptName = Cryptographer.DecryptSymmetric("symmProvider", CryptName);
}
}