1 DES类
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
using System.IO;
namespace NoticeBoard
{
/// <summary>
/// DES加密解密算法
/// </summary>
public class DES
{
/// <summary>
/// DES加密算法
/// sKey为8位或16位
/// </summary>
/// <param name="pToEncrypt">需要加密的字符串</param>
/// <param name="sKey">密钥</param>
/// <returns></returns>
public string DesEncrypt(string pToEncrypt, string sKey)
{
StringBuilder ret = new StringBuilder();
try
{