From 10468842dba21f4ec1f46a593717b67e68052cd6 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Tue, 16 Jul 2024 16:44:40 +0300 Subject: [PATCH] Remove unneeded variable --- internal/gost34112012/hash.go | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/internal/gost34112012/hash.go b/internal/gost34112012/hash.go index 0a844c8..40eb2f0 100644 --- a/internal/gost34112012/hash.go +++ b/internal/gost34112012/hash.go @@ -431,16 +431,15 @@ func (h *Hash) ps(data []byte) []byte { func l(out, data []byte) []byte { for i := 0; i < 8; i++ { - res64 := uint64(0) - res64 ^= cache[0][data[8*i+0]] - res64 ^= cache[1][data[8*i+1]] - res64 ^= cache[2][data[8*i+2]] - res64 ^= cache[3][data[8*i+3]] - res64 ^= cache[4][data[8*i+4]] - res64 ^= cache[5][data[8*i+5]] - res64 ^= cache[6][data[8*i+6]] - res64 ^= cache[7][data[8*i+7]] - binary.LittleEndian.PutUint64(out[i*8:i*8+8], res64) + binary.LittleEndian.PutUint64(out[i*8:i*8+8], + cache[0][data[8*i+0]]^ + cache[1][data[8*i+1]]^ + cache[2][data[8*i+2]]^ + cache[3][data[8*i+3]]^ + cache[4][data[8*i+4]]^ + cache[5][data[8*i+5]]^ + cache[6][data[8*i+6]]^ + cache[7][data[8*i+7]]) } return out } -- 2.48.1