devilution icon indicating copy to clipboard operation
devilution copied to clipboard

sha.cpp

Open AJenbo opened this issue 6 years ago • 7 comments

  • [x] SHA1Clear
  • [x] SHA1Result
  • [x] SHA1Calculate
  • [x] SHA1Input
  • [ ] SHA1ProcessMessageBlock
  • [x] SHA1Reset
  • [x] SHA1Init

AJenbo avatar Aug 29 '19 16:08 AJenbo

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

glebm avatar Oct 09 '19 13:10 glebm

it's not bin exact in vanilla image

qndel avatar Oct 09 '19 13:10 qndel

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.

AJenbo avatar Oct 09 '19 13:10 AJenbo

it's not bin exact in vanilla

Is the int version bin exact?

glebm avatar Oct 09 '19 13:10 glebm

ofc, we got ALL functions in vanilla bin exact

qndel avatar Oct 09 '19 13:10 qndel

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

glebm avatar Oct 09 '19 13:10 glebm

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

qndel avatar Oct 09 '19 13:10 qndel