PHP crc32 () only

I have an MD5 hash: 10f86782177490f2ac970b8dc4c51014

http://www.fileformat.info/tool/hash.htm?text=10f86782177490f2ac970b8dc4c51014 Result: c74e16d9

but PHP: crc32 ('10f86782177490f2ac970b8dc4c51014'); Result: -951183655

I do not understand!

+7
php crc32
source share
1 answer

This is just a data presentation issue:


And here is a piece of code to illustrate this:

 $crc = crc32('10f86782177490f2ac970b8dc4c51014'); var_dump($crc); var_dump(dechex($crc)); 

The following is displayed:

 int -951183655 string 'c74e16d9' (length=8) 

Which corresponds to:

  • Decimal value representation of your CRC
  • and after that a hexadecimal representation of the same meaning.
+17
source share

All Articles