FormsAuthentication.HashPasswordForStoringInConfigFile(str1, str2);

protected void Page_Load(object sender, EventArgs e)
{
//string g=Request.Url.ToString();
//Response.Write(g );
string[] str = { "Ab","B1db","a7sjdkf","b2dd","C3jsdfl","d!c4s"};
Array.Sort(str);
string str1 = string.Join(" ",str);
string str2= System.Web.Configuration.FormsAuthPasswordFormat.SHA1.ToString ();
str1= FormsAuthentication.HashPasswordForStoringInConfigFile(str1, str2);

ClientScript.RegisterStartupScript(GetType(), "", "alert('"+str1+"')", true);

}

原文地址:https://www.cnblogs.com/zhubenxi/p/5332147.html