Digest: Difference between revisions
No edit summary |
m Added game's digest generating method. |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
{{MappingBar}} | {{MappingBar}} | ||
Digest section is considered by the game as the last section of a map, found at the bottom of the map files. It contains a unique identification or signature. This section contains 1 line of base64 encoded 20-byte long hex code. | |||
This section is | Game differentiates between a map having a digest or not for online map listing. It's used to ensure all clients (i.e. players) have the same version of the map. If there's a mismatch in the digest value or the map hash/sizes between the players, the game assumes the maps to be different and it will transfer the host's map file to the other players. This section has no effect on singleplayer mission maps. | ||
Game's method of generating digest entry is by using the hash of the data from INIClass (internal INI content which doesn't contain comments with some space and tabs removed) and then encoding with base64. | |||
FinalSun/FinalAlert2 uses system up time as seed for generating a random number which is further processed to make it a 20-bytes long value. Basically, a random number could be used to generate a 20-byte long unique hex value which can be encoded using base64 to generate the unique identification for the map's digest entry. FinalSun/FinalAlert2 doesn't change the digest entry when saving edited maps. It generates a new entry if digest is not present. | |||
==See Also== | ==See Also== |
Latest revision as of 16:29, 2 March 2021
Digest section is considered by the game as the last section of a map, found at the bottom of the map files. It contains a unique identification or signature. This section contains 1 line of base64 encoded 20-byte long hex code.
Game differentiates between a map having a digest or not for online map listing. It's used to ensure all clients (i.e. players) have the same version of the map. If there's a mismatch in the digest value or the map hash/sizes between the players, the game assumes the maps to be different and it will transfer the host's map file to the other players. This section has no effect on singleplayer mission maps.
Game's method of generating digest entry is by using the hash of the data from INIClass (internal INI content which doesn't contain comments with some space and tabs removed) and then encoding with base64.
FinalSun/FinalAlert2 uses system up time as seed for generating a random number which is further processed to make it a 20-bytes long value. Basically, a random number could be used to generate a 20-byte long unique hex value which can be encoded using base64 to generate the unique identification for the map's digest entry. FinalSun/FinalAlert2 doesn't change the digest entry when saving edited maps. It generates a new entry if digest is not present.