From 6842da31a37df6b9be9f8d25fb09e08cc80b7d8d Mon Sep 17 00:00:00 2001 From: "guoxing.li" <53087517+guoxing-li@users.noreply.github.com> Date: Mon, 2 Mar 2026 16:25:49 +0800 Subject: [PATCH] fix: PJW64 should use 64-bit width --- encoding/ghash/ghash_pjw.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encoding/ghash/ghash_pjw.go b/encoding/ghash/ghash_pjw.go index 5b82ca1ed20..85820b1bc24 100644 --- a/encoding/ghash/ghash_pjw.go +++ b/encoding/ghash/ghash_pjw.go @@ -28,7 +28,7 @@ func PJW(str []byte) uint32 { // PJW64 implements the classic PJW hash algorithm for 64 bits. func PJW64(str []byte) uint64 { var ( - BitsInUnsignedInt uint64 = 32 // 4 * 8 + BitsInUnsignedInt uint64 = 64 // 4 * 8 ThreeQuarters = (BitsInUnsignedInt * 3) / 4 OneEighth = BitsInUnsignedInt / 8 HighBits uint64 = (0xFFFFFFFFFFFFFFFF) << (BitsInUnsignedInt - OneEighth)