An idea came to me about a file having what I would call a 'magic number'.
Let's take these 5 bytes:
10 30 54 62 81
To calculate the magic number, you add the first byte, subtract the second, add the third, subtract the fourth, and so on.
It keeps adding/subtracting until it gets to the last...