diff options
Diffstat (limited to 'crypto/crypto.go')
-rw-r--r-- | crypto/crypto.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/crypto.go b/crypto/crypto.go index d56b9112f..42e6036b5 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -27,10 +27,11 @@ func init() { ecies.AddParamsForCurve(S256(), ecies.ECIES_AES128_SHA256) } -func Sha3(data []byte) []byte { +func Sha3(data ...[]byte) []byte { d := sha3.NewKeccak256() - d.Write(data) - + for _, b := range data { + d.Write(b) + } return d.Sum(nil) } |