//名称空间 using System; using System.Security.Cryptography; using System.IO; using System.Text; //方法 //加密方法 public string Encrypt(string pToEncrypt, string sKey) -------代码完毕-------------------- 注意:sKey输入密码的时候,必须使用英文字符,区分大小写,且字符数量是8个,不能多也不能少,否则出错。 本人使用Windows2000 Server .Net Framework SP3 ,VS.Net下在asp.net下使用成功,加密解密正常! 相关文章: