]> Cypherpunks.ru repositories - gogost.git/blobdiff - mgm/mul.go
Raise copyright years
[gogost.git] / mgm / mul.go
index 7e0daaec6e05b449ae2053d0531cdbb3b8d7519c..8fec46619ded35d6e7fb430492254366a22c2060 100644 (file)
@@ -1,5 +1,5 @@
 // GoGOST -- Pure Go GOST cryptographic functions library
-// Copyright (C) 2015-2019 Sergey Matveev <stargrave@stargrave.org>
+// Copyright (C) 2015-2021 Sergey Matveev <stargrave@stargrave.org>
 //
 // This program is free software: you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -19,7 +19,6 @@ func (mgm *MGM) mul(xBuf, yBuf []byte) []byte {
        mgm.x.SetBytes(xBuf)
        mgm.y.SetBytes(yBuf)
        mgm.z.SetInt64(0)
-       var i int
        for mgm.y.BitLen() != 0 {
                if mgm.y.Bit(0) == 1 {
                        mgm.z.Xor(mgm.z, mgm.x)
@@ -35,7 +34,7 @@ func (mgm *MGM) mul(xBuf, yBuf []byte) []byte {
        }
        zBytes := mgm.z.Bytes()
        rem := len(xBuf) - len(zBytes)
-       for i = 0; i < rem; i++ {
+       for i := 0; i < rem; i++ {
                mgm.mulBuf[i] = 0
        }
        copy(mgm.mulBuf[rem:], zBytes)