go.crypto/blowfish: no need for key in initCipher
LGTM=robert.hencke
R=golang-codereviews, robert.hencke
CC=golang-codereviews
https://golang.org/cl/84860043
diff --git a/blowfish/cipher.go b/blowfish/cipher.go
index d346684..9f2c104 100644
--- a/blowfish/cipher.go
+++ b/blowfish/cipher.go
@@ -32,7 +32,7 @@
if k := len(key); k < 1 || k > 56 {
return nil, KeySizeError(k)
}
- initCipher(key, &result)
+ initCipher(&result)
ExpandKey(key, &result)
return &result, nil
}
@@ -46,7 +46,7 @@
if k := len(key); k < 1 {
return nil, KeySizeError(k)
}
- initCipher(key, &result)
+ initCipher(&result)
expandKeyWithSalt(key, salt, &result)
return &result, nil
}
@@ -79,7 +79,7 @@
dst[4], dst[5], dst[6], dst[7] = byte(r>>24), byte(r>>16), byte(r>>8), byte(r)
}
-func initCipher(key []byte, c *Cipher) {
+func initCipher(c *Cipher) {
copy(c.p[0:], p[0:])
copy(c.s0[0:], s0[0:])
copy(c.s1[0:], s1[0:])