Florian Klaempfl wrote: >> Probably the author found a way to keep the checksum ? > > 1) On loading, the checksum is not recalculated but the compiler thrusts > the header so the checksum can be easily patched. > 2) FPC uses a CRC, a CRC can be easily faked today.
Without knowing to much about the compiler internals... Wouldn't a SHA1 be a better option than CRC? For example, Git uses SHA1's to cryptographically ensure that no revision in the repository has been tampered with. Just a single byte change generates a completely different SHA1. I have a SHA1 implementation in Object Pascal (with some unit tests) if you are interested - I used it when I was following the Git implementation from the first revision, implementing Git using Free Pascal as I go through the revisions. All this just for fun - how sad am I. ;-) Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
