prysm-pulse/shared/keystore/keccak256.go
Preston Van Loon c30913266c
Remove paths to go-ethereum crypto in validator (#1635)
* remove a few references that tie the validator binary to the go-ethereum crypto library

* fixes

* remove unused vars

* gazelle

* nosec on this crypto library
2019-02-19 01:17:27 -05:00

14 lines
279 B
Go

package keystore
import "golang.org/x/crypto/sha3"
// Keccak256 calculates and returns the Keccak256 hash of the input data.
func Keccak256(data ...[]byte) []byte {
d := sha3.NewLegacyKeccak256()
for _, b := range data {
// #nosec G104
d.Write(b)
}
return d.Sum(nil)
}