note 95482 deleted from function.crc32 by thiago
| From: | thiago@php.net | Date: | Tue, 05 Jan 2010 16:12:45 +0000 |
| Subject: | note 95482 deleted from function.crc32 by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-164660@lists.php.net to get a copy of this message | ||
Note Submitter: martinlatter at NOSPAMhotmail dot com
----
Wondered about the different results between the crc32() and hash() functions, even when the
different return types were taken into account between the two functions.
<?php
echo dechex(crc32('12345')) . "\n";
echo hash('crc32', '12345') . "\n";
echo hash('crc32b', '12345');
?>
->
cbf53a1c
b8486542
cbf53a1c
From additional verification
e.g. http://rogeriopvl.com/hashr/
PHP's crc32() function is calculating the crc32b checksum.
Perhaps this might be useful for clarification.