You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
275 B

package keccak256
import (
"golang.org/x/crypto/sha3"
)
// Hash generates a Keccak256 hash from a byte array
func Hash(data ...[]byte) []byte {
hash := sha3.NewLegacyKeccak256()
for _, d := range data {
hash.Write(d) //nolint:errcheck,gosec
}
return hash.Sum(nil)
}