From: Sergey Matveev Date: Tue, 16 Jul 2024 13:44:40 +0000 (+0300) Subject: Remove unneeded variable X-Git-Tag: v5.15.0~4 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=10468842dba21f4ec1f46a593717b67e68052cd6;p=gogost.git Remove unneeded variable --- 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 }