[Solved] How to Self checksuming work?


I think there is a problem with trying to put the checksum or hash directly into your executable. Such an approach would mean that the checksum/hash is going to be taken into account when determining the checksum/hash of your executable/binary. You can’t encode the checksum/hash without affecting the resulting hash/checksum of the binary/executable.

Without knowing more details of your situation, you probably want to have the hash of the binary stored outside of the thing you are trying to compute the checksum/hash of (ex. externally on a server or in a file located relative to the executable, etc.). You compute this hash after you’ve built your program. Your program on launch could then locate itself on disk and compute the hash of itself and compare to the hash stored externally.

Sorry if this would be better as a comment, but I don’t have the rep to comment.

3

solved How to Self checksuming work?