mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 04:36:42 +00:00
crypto: fix variable shadowing in Keccak256 functions
This commit is contained in:
parent
960c87a944
commit
0093739829
1 changed files with 4 additions and 4 deletions
|
|
@ -41,8 +41,8 @@ func Keccak256(data ...[]byte) []byte {
|
|||
b := make([]byte, 32)
|
||||
d := hasherPool.Get().(KeccakState)
|
||||
d.Reset()
|
||||
for _, b := range data {
|
||||
d.Write(b)
|
||||
for _, chunk := range data {
|
||||
d.Write(chunk)
|
||||
}
|
||||
d.Read(b)
|
||||
hasherPool.Put(d)
|
||||
|
|
@ -54,8 +54,8 @@ func Keccak256(data ...[]byte) []byte {
|
|||
func Keccak256Hash(data ...[]byte) (h common.Hash) {
|
||||
d := hasherPool.Get().(KeccakState)
|
||||
d.Reset()
|
||||
for _, b := range data {
|
||||
d.Write(b)
|
||||
for _, chunk := range data {
|
||||
d.Write(chunk)
|
||||
}
|
||||
d.Read(h[:])
|
||||
hasherPool.Put(d)
|
||||
|
|
|
|||
Loading…
Reference in a new issue