摘要: using System.Web.Security;public static string CreatePassword(string StrPassword, CurrentEnum.SecurityPassword PassType) { string Password = ""; switch (PassType) { case CurrentEnum.SecurityPassword.M... 阅读全文
posted @ 2009-07-31 15:43 94cool 阅读(223) 评论(0) 推荐(0)
摘要: using System.Security;using System.Security.Cryptography;MD5 md5=new MD5CryptoServiceProvider();byte[] bt=Encoding.Default.GetBytes("待加密字符串");//将待加密字符转为 字节型数组byte[] resualt=md5.ComputeHash(bt);//将字节数组... 阅读全文
posted @ 2009-07-31 15:41 94cool 阅读(725) 评论(0) 推荐(0)
摘要: web form md5与winform md5不一样/// <summary>/// MD5加密/// </summary>/// <param name="str"></param>/// <returns></returns> public string UserMd5(string str) { string cl =... 阅读全文
posted @ 2009-07-31 15:40 94cool 阅读(351) 评论(0) 推荐(0)
摘要: 1:public static bool IsExist(string uri) { HttpWebRequest req = null; HttpWebResponse res = null; try { req = (HttpWebRequest)WebRequest.Create(uri); req.Method = "HEAD"; req.Timeout = 100; res = (Htt... 阅读全文
posted @ 2009-07-31 14:13 94cool 阅读(574) 评论(0) 推荐(0)