C#Web网站,我想在路径参数上加入安全、加密。比如:
现在是http://xxx.xxx.com/index.aspx?id=1&name=xiaoli
想进行加密变成http://xxx.xxx.com/index.aspx?dfwjotiujsgns$^goiu@#%请问C#如何实现呢,请给段简单函数或者例码,谢谢各位了~~
现在是http://xxx.xxx.com/index.aspx?id=1&name=xiaoli
想进行加密变成http://xxx.xxx.com/index.aspx?dfwjotiujsgns$^goiu@#%请问C#如何实现呢,请给段简单函数或者例码,谢谢各位了~~
string newstr=System.Web.HttpUtility.UrlEncode("id=1&name=xiaoli", YourEncoding);
string oldstr=Server.UrlDecode(newstr,YourEncodeing);