Page 1 of 1

Checksum-32...

Posted: 27 Jan 2010 14:25
by BoneIdol
Anyone know exactly what this is? I'm trying to write a program to automate some Hex editing I use HxD for and the files I edit use this algorithm, so I've got to implement this. Google searching "Checksum-32 Algorithm" isn't giving me much luck. :(

Cheers!

Re: Checksum-32...

Posted: 27 Jan 2010 21:02
by Maƫl
Checksums are built by summing up all the bytes in a file modulo the cardinality of the co-domain of the specific Checksum-function:

Code: Select all

Checksum-X(file) = Sum_of_all_bytes(file) mod 2^X
Example for Checksum-8 for a file with 5 Bytes:

Code: Select all

file = 123, 45, 253, 165, 233
Sum_of_all_bytes(file) = 123 + 45 + 253 + 165 + 233  = 819
Checksum-8(file) = Sum_of_all_bytes(file) mod 2^8 = 819 mod 256 = 51

Re: Checksum-32...

Posted: 28 Jan 2010 13:11
by BoneIdol
God that simple! Now I do feel an idiot. I bloody spent ages trying out every hash algorithm under the sun as well; I thought it might have been one of the hashes in hashlib! or something.

Thank you so much, you've really helped me with this. :D