8 years later, I want to also write a script that builds a plugin, and I need to be able to write the checksum myself
I also wanted to write this in PHP.
There is one thing I noticed: I had to subtract 1 to get the final result that would match the examples from e.g. here: https://pottertradingcardgame.webs.com/updatelist.txt
That's not covered in your algorithm...
But what's also not covered is how you get to big negative numbers in the case of seemingly larger files (like images).
How do I get larger images to emit the same large negative numbers, has the algorithm changed?
EDIT: never mind, I figured it out. I didn't realize C did funny conversions when adding a char casted to an unsigned into to a signed int. Chars with values 128 and up effectively got added as negative numbers according to the LackeyCCG algorithm. Here's the fix applied to my PHP code: https://github.com/amcsi/lycee-overture/commit/05599951f0c5f228c911df7f2ed6e674faf0960e
I also wanted to write this in PHP.
There is one thing I noticed: I had to subtract 1 to get the final result that would match the examples from e.g. here: https://pottertradingcardgame.webs.com/updatelist.txt
That's not covered in your algorithm...
But what's also not covered is how you get to big negative numbers in the case of seemingly larger files (like images).
How do I get larger images to emit the same large negative numbers, has the algorithm changed?
EDIT: never mind, I figured it out. I didn't realize C did funny conversions when adding a char casted to an unsigned into to a signed int. Chars with values 128 and up effectively got added as negative numbers according to the LackeyCCG algorithm. Here's the fix applied to my PHP code: https://github.com/amcsi/lycee-overture/commit/05599951f0c5f228c911df7f2ed6e674faf0960e