SHA1 checksums of mods

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
Artentus
Filter Inserter
Filter Inserter
Posts: 307
Joined: Sat Sep 24, 2016 8:16 pm
Contact:

SHA1 checksums of mods

Post by Artentus »

Not directly related to the game, if this belongs somewhere else please tell me.

I'm writing sofware that downloads mods from the mod portal.
Using the mod portal API to download mods, you are supplied a SHA1 checksum in the JSON response like this:

Code: Select all

	{
            ... ,
            "latest_release": {
                ... ,
                "sha1": "bbd86d46a4893c416f3f7775d6abb8698feb42e7"
            }
        }
However this checksum doesn't match the actual checksum of the downloaded mod file (checked multiple implementations and they all produced the same result, which was unequal to the provided hash).
I want to perform proper file integrity checks so I'd be thankful if someone told me how this is being calculated.
Thanks in advance!

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2227
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: SHA1 checksums of mods

Post by boskid »

Using SHA1 from 7zip it works as expected:
82633-sha1.png
82633-sha1.png (3.59 KiB) Viewed 623 times

Artentus
Filter Inserter
Filter Inserter
Posts: 307
Joined: Sat Sep 24, 2016 8:16 pm
Contact:

Re: SHA1 checksums of mods

Post by Artentus »

Interesting. Thanks for your response.

When I download the file in my browser the checksum matches up. But if I download it in code it doesn't. Looks like the way I'm downloading somehow messes with the file.
I'll have to look into this. Consider it solved. Thanks!

Post Reply

Return to “Technical Help”