Current location - Quotes Website - Personality signature - Analysis of API signature algorithm for xiaohongshu
Analysis of API signature algorithm for xiaohongshu
The little red book APP API interface uses the sign parameter in the url and the shield parameter in the header to verify the validity of the request. Let's look at an API request:

The sign parameter is calculated by using the parameters in the url, and the general process is as follows:

Insert picture caption here Insert picture caption here.

The shield parameter is calculated from url with sign parameter, and the shield field is inserted into the header by intercepting the request. This part is implemented in the process method, which is a native method and defined in libshield.so

Insert picture caption here Insert picture caption here.