加密的方法是这样的,想要修改用户密码,该怎么调用此方法
public static string md5(string str, int code)
{
string strEncrypt = string.Empty;
if (code == 16)
{
strEncrypt = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5").Substring(8, 16);
} if (code == 32)
{
strEncrypt = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5");
} return strEncrypt;
}
public static string md5(string str, int code)
{
string strEncrypt = string.Empty;
if (code == 16)
{
strEncrypt = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5").Substring(8, 16);
} if (code == 32)
{
strEncrypt = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5");
} return strEncrypt;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货