I was calculating the checksum manually. I'm writing a Tetris clone and I was adding highscores, the highscores file needed some encryption to prevent users from easily hacking it.
The checksum stored will be in the same endianness as when read, because usually the highscores data file will be on one computer and not transferred to another. Have you got any suggestions for me?
Oh and for the [size-4] thing, I already substracted 4 from 'l_iDataSize', forgot to put it in my start post.