diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go index df75441072..da123cf980 100644 --- a/crypto/crypto_test.go +++ b/crypto/crypto_test.go @@ -44,7 +44,8 @@ func TestKeccak256Hash(t *testing.T) { func TestKeccak256Hasher(t *testing.T) { msg := []byte("abc") exp, _ := hex.DecodeString("4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45") - checkhash(t, "Sha3-256-array", func(in []byte) []byte { h := Keccak256Hash(in); return h[:] }, msg, exp) + hasher := NewKeccakState() + checkhash(t, "Sha3-256-array", func(in []byte) []byte { h := HashData(hasher, in); return h[:] }, msg, exp) } func TestToECDSAErrors(t *testing.T) {