crc32c Hashing Algorithm

Cyclic redundancy checks (CRCs) are used for verifying data integrity. The most commonly used algorithms for calculating CRC values are CRC-32-IEEE and CRC-32C. The former is used by Ethernet, SATA, bzip2, gzip, and PNG, for instance. The latter is used by btrfs, ext4, iSCSI, and Apache Kafka, for instance.

PHP has supported cyclic redundancy checks using CRC-32-IEEE since PHP 4 using with the crc32() function and since PHP 5.1 through the hash extension. Support for CRC-32C was added to the hash extension in PHP 7.4:

var_dump(hash('crc32c', 'PHP now supports CRC-32C.'));

The result is:

string(8) "7c5acb60"