![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
|
Calculate CRC32 checksums (like SFVs)
import binascii
def getCRC(filename):
filedata = open(filename).read()
return binascii.crc32(filedata)So far i've got this and it returns something like: -2087276233 Someone told me that I had to use struct.pack or struct.unpack to change it to hex values. I am not sure which type to convert to and would like some explanation to understand fully instead of coding in blind. The final result should show the same CRC32 value as if you packed the file in WinRAR, checked it with the numerous SFV-checkers or whatever. A link just in case: http://docs.python.org/library/struct.html Thanks alot in advance! |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Calculate using '-' HELP! | DJ007 | C | 5 | Jun 28th, 2009 6:43 AM |
| calculate distance using values in an array | annie_singh | Perl | 3 | Oct 5th, 2008 12:33 AM |
| VB.NET: Loops - calculate selected items | jaybird01 | Visual Basic .NET | 7 | Aug 14th, 2006 6:35 AM |
| need help on how to calculate between 2 input times. | oslan | C | 18 | Feb 14th, 2006 10:15 PM |