Php verification data problems

Source: Internet
Author: User
Php verification data problems PHPcode $ str3 = $ str1. $ str2; // only the checksum of $ str1 and $ str2 are available. // How can I calculate the checksum of $ str3 through crc32, from the data feature value, cyclic redundancy check code can not calculate the original data .. 12 php verification data problems
PHP code
  $ Str3 = $ str1. $ str2; // currently, only the checksum of $ str1 and $ str2 are available. // How can I calculate the checksum of $ str3 through crc32?


------ Solution --------------------
There is no way, from the data feature value, cyclic redundancy check code can not calculate the original data .. 128-bit, 512-bit, or 32-bit data cannot represent an infinite amount of data.
PHP code
Var_dump (crc32 ("86821"), crc32 ("14740600 "));
------ Solution --------------------
Possible!

The CRC algorithm can be clearly stated by referring to the http://blog.csdn.net/sparkliang/article/details/5671510.

You can use the checksum value of $ str1 as the base value and continue to calculate the content of $ str2.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.