From 202da23be366c3bf179b9552c9538f58baf90d18 Mon Sep 17 00:00:00 2001 From: afonya2 Date: Sat, 17 May 2025 18:25:49 +0200 Subject: [PATCH] fix some hash verification skill issue --- IGA.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/IGA.ts b/IGA.ts index 0fe5a84..c5ad9d9 100644 --- a/IGA.ts +++ b/IGA.ts @@ -231,8 +231,9 @@ function hash(input: string, salt: number = 0, len: number = 32, seed?: number): dataBins[0] = xor(dataBins[0], dataBins[1]) dataBins.splice(1, 1) } - const crc = checksum(dataBins[0]) - const hash = bin2hex(pBin + dataBins[0] + crc) + let hash = bin2hex(pBin + dataBins[0]) + const crc = checksum(hash) + hash += bin2hex(crc) return hash }