如何隐藏数据库连接的用户名密码
1个回答
展开全部
public static string Encrypt(string Password, int Format)
{
string str = "";
switch (Format)
{
case 0:
str = FormsAuthentication.HashPasswordForStoringInConfigFile(Password, "SHA1");
break;
case 1:
str = FormsAuthentication.HashPasswordForStoringInConfigFile(Password, "MD5");
break;
}
return str;
}
{
string str = "";
switch (Format)
{
case 0:
str = FormsAuthentication.HashPasswordForStoringInConfigFile(Password, "SHA1");
break;
case 1:
str = FormsAuthentication.HashPasswordForStoringInConfigFile(Password, "MD5");
break;
}
return str;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询