]> Cypherpunks repositories - gogost.git/commitdiff
Remove unneeded variable
authorSergey Matveev <stargrave@stargrave.org>
Tue, 16 Jul 2024 13:44:40 +0000 (16:44 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Tue, 16 Jul 2024 15:23:55 +0000 (18:23 +0300)
internal/gost34112012/hash.go

index 0a844c83ede0b69b3e75555961947b88d1b287c9..40eb2f0d04c57d3629956b6a66acb3f88b410cee 100644 (file)
@@ -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
 }