When a Web server communicates with an app server, it often uses different languages on both ends. For example, this time I met PHP and C.
PHP as a high-level language, a variety of convenient library functions are readily accessible, in the PHP crc32 function call process, only need a parameter: The data is verified to be OK.
However, in C language is not the same, the CRC32 function prototype is unsigned int crc32 (unsigned int crc,unsigned char *buf,int size) Three parameters are generated polynomial, verified data, the data length is verified. The return value is a CRC check code
So the question is, when the Web side uses PHP's CRC32 function checksum, what parameters does the app server use to verify the data transmitted by the Web?
I found a lot of information, there is said to be CRC32 standard generation polynomial 0x4c11db7, there is said to be 0xFFFFFFFF, try to be wrong.
Finally read a piece of information, said PHP after the CRC to take the reverse once, with 0xFFFFFFFF to try again, OK, right!
CRC32 functions for PHP and Python