Skip to content

Commit 0093739

Browse files
authored
crypto: fix variable shadowing in Keccak256 functions
1 parent 960c87a commit 0093739

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crypto/keccak.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ func Keccak256(data ...[]byte) []byte {
4141
b := make([]byte, 32)
4242
d := hasherPool.Get().(KeccakState)
4343
d.Reset()
44-
for _, b := range data {
45-
d.Write(b)
44+
for _, chunk := range data {
45+
d.Write(chunk)
4646
}
4747
d.Read(b)
4848
hasherPool.Put(d)
@@ -54,8 +54,8 @@ func Keccak256(data ...[]byte) []byte {
5454
func Keccak256Hash(data ...[]byte) (h common.Hash) {
5555
d := hasherPool.Get().(KeccakState)
5656
d.Reset()
57-
for _, b := range data {
58-
d.Write(b)
57+
for _, chunk := range data {
58+
d.Write(chunk)
5959
}
6060
d.Read(h[:])
6161
hasherPool.Put(d)

0 commit comments

Comments
 (0)