mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 03:30:35 +00:00
ee5d75732d
* Add pkg crypto * Update go.yml Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
16 lines
284 B
Go
16 lines
284 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)
|
|
}
|