.net加密与解密QueryString的方法
1,加密
Response.Redirect("Default.ASPX?id=" + Convert.ToBase64String(System.Text.Encoding.Default.GetBytes("sp10006")).Replace("+","%2B"));
2,解密
string ID = System.Text.Encoding.Default.GetString(Convert.FromBase64String(Request.QueryString["id"].ToString().Replace("%2B","+")));
Response.Redirect("Default.ASPX?id=" + Convert.ToBase64String(System.Text.Encoding.Default.GetBytes("sp10006")).Replace("+","%2B"));
2,解密
string ID = System.Text.Encoding.Default.GetString(Convert.FromBase64String(Request.QueryString["id"].ToString().Replace("%2B","+")));