binascii.crc32 results not matching

Larry Bates larry.bates at websafe.com
Fri Dec 9 20:39:45 EST 2005


I'm trying to get the results of binascii.crc32
to match the results of another utility that produces
32 bit unsigned CRCs.  binascii.crc32 returns
results in the range of -2**31-1 and 2**21-1. Has
anyone ever worked out any "bit twiddling" code to
get a proper unsigned 32 bit result from binascii.crc32?

Output snip from test on three files:

binascii.crc32=-1412119273, oldcrc32= 2221277246
binascii.crc32=-647246320, oldcrc32=73793598
binascii.crc32=-1391482316, oldcrc32=79075810

Thanks in advance,
Regards,
Larry Bates



More information about the Python-list mailing list