A sign algorithm principle is simple
The code below
Public string GetSig (string request, string body)
{
The string result=request + body;
Result=web. UrlDecode (result, Encoding UTF8);
UrlHelper url=new UrlHelper (result);
Result=url. Sort ();
The debug. WriteLine (result);
Result=result. Replace (" & amp;" , "");
The debug. WriteLine (result);
Result=Encoding. UTF8. GetBytes (result). The Md5 () ToHex () ToLower ();
return result;
}
When the body parameter contains the URL address server error prompt signature
For example: referer=http://https://bbs.csdn.net/topics/new? Forum_id=CSharp& Id=1
After debugging is parameter contains the inside & amp; Character segmentation error in
Consult everybody a great god how should handle
CodePudding user response:
You this parameter is CSharp& forum_id value; Id=1, rather than a forum_id with id?
CodePudding user response:
The