日期:2014-05-17 浏览次数:20503 次
string sPassword = Password.Text;
public class test
{
public static string GetMD5HashCode(this string value) { MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider(); byte[] data = md5.ComputeHash(Encoding.UTF8.GetBytes(value)); md5.Clear(); return BitConverter.ToString(data).Replace("-", ""); }
protected void CreateUserButton_Click(object sender, EventArgs e) { string getMD5=GetMD5HashCode(txtPwd.Text) }
}
class static ChatHelper{
public static string GetMD5HashCode(this string value)
{
MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
byte[] data = md5.ComputeHash(Encoding.UTF8.GetBytes(value));
md5.Clear();
return BitConverter.ToString(data).Replace("-", "");
}
}