web中对密码进行MD5加密(做笔记)
public static string MD5(string p_String)
{
return System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(p_String, "MD5");
}
protected void Btn_MD5_Click(object sender, EventArgs e)
{
string m_Pwd=txtPwd.Text.Trim();
if (!string.IsNullOrEmpty(m_Pwd))
{
Label1.Text = MD5(m_Pwd);
}
}