diasurgical / devilution

Diablo devolved - magic behind the 1996 computer game
Other
8.77k stars 919 forks source link

sha.cpp #1384

Open AJenbo opened 5 years ago

AJenbo commented 5 years ago
glebm commented 5 years ago

Perhaps SHA1ProcessMessageBlock needs to use DWORD internally instead of int:

    DWORD i, temp;
    DWORD W[80];
    DWORD A, B, C, D, E;

The current code in there does not calculate SHA1 (because it bit-shifts signed types instead of unsigned ones).

If this turns out to be the correct fix, it will break compatibility with existing devilution save games (due to signatures not matching).

Related: https://github.com/diasurgical/devilutionX/pull/341

qndel commented 5 years ago

it's not bin exact in vanilla image

AJenbo commented 5 years ago

Blizzard SHA1 is notoriously broken compared to the standard, this issue affects most of there games afaik. Since we strive to be compatible with the original save games we can't really fix this either.

glebm commented 5 years ago

it's not bin exact in vanilla

Is the int version bin exact?

qndel commented 5 years ago

ofc, we got ALL functions in vanilla bin exact

glebm commented 5 years ago

Nice! What's the empty checkbox next to the function name referring to btw?

qndel commented 5 years ago

hellfire bin exact progress https://github.com/diasurgical/devilution/milestone/4