diff options
author | Veselkov Konstantin <kostozyb@gmail.com> | 2018-09-15 21:23:36 +0400 |
---|---|---|
committer | Kurt Jung <kurt.w.jung@gmail.com> | 2018-09-15 13:23:36 -0400 |
commit | 7d57599b9d9c5fb48ea733596cbb812d7f84a8d6 (patch) | |
tree | 5c4b8a4ffd2fa420877bed0aea4eecc789316af0 /protect.go | |
parent | 964b1221fa545d09ad62569f58a94dbbadaad57c (diff) |
fixed warnings gocritic 3.3 (#192)
Diffstat (limited to 'protect.go')
-rw-r--r-- | protect.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -68,8 +68,8 @@ func oValueGen(userPass, ownerPass []byte) (v []byte) { var c *rc4.Cipher tmp := md5.Sum(ownerPass) c, _ = rc4.NewCipher(tmp[0:5]) - cap := len(userPass) - v = make([]byte, cap, cap) + size := len(userPass) + v = make([]byte, size, size) c.XORKeyStream(v, userPass) return } @@ -77,8 +77,8 @@ func oValueGen(userPass, ownerPass []byte) (v []byte) { func (p *protectType) uValueGen() (v []byte) { var c *rc4.Cipher c, _ = rc4.NewCipher(p.encryptionKey) - cap := len(p.padding) - v = make([]byte, cap, cap) + size := len(p.padding) + v = make([]byte, size, size) c.XORKeyStream(v, p.padding) return } |