I want my Python crc32
function get the same result with PHP hash
function. Where is the Python module in this world? My heart is almost collapsed at this moment.
The PHP function is:
hexdec(hash('crc32', 'hi', false))
The Python function I used:
binascii.crc32('hi') & 0xffffffff
PHP:
<?php
function_exists('abs');
function_exists('hexdec');
function_exists('hash');
$hash = hexdec(hash('crc32', 'hi', false));
echo $hash. "\n";
?>
Output:
4049932203
Python:
import binascii
binascii.crc32('hi') & 0xffffffff
Output:
3633523372