fix some hash verification skill issue

This commit is contained in:
afonya2 2025-05-17 18:25:49 +02:00
parent 2f832a2066
commit 202da23be3
Signed by: afonya
GPG key ID: EBB9C4CAFAAFB2DC

5
IGA.ts
View file

@ -231,8 +231,9 @@ function hash(input: string, salt: number = 0, len: number = 32, seed?: number):
dataBins[0] = xor(dataBins[0], dataBins[1]) dataBins[0] = xor(dataBins[0], dataBins[1])
dataBins.splice(1, 1) dataBins.splice(1, 1)
} }
const crc = checksum(dataBins[0]) let hash = bin2hex(pBin + dataBins[0])
const hash = bin2hex(pBin + dataBins[0] + crc) const crc = checksum(hash)
hash += bin2hex(crc)
return hash return hash
} }