diff options
Diffstat (limited to 'ethutil/helpers.go')
-rw-r--r-- | ethutil/helpers.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ethutil/helpers.go b/ethutil/helpers.go index 1c6adf256..aa0f79a04 100644 --- a/ethutil/helpers.go +++ b/ethutil/helpers.go @@ -27,7 +27,6 @@ func Ripemd160(data []byte) []byte { func Sha3Bin(data []byte) []byte { d := sha3.NewKeccak256() - d.Reset() d.Write(data) return d.Sum(nil) @@ -59,3 +58,7 @@ func MatchingNibbleLength(a, b []int) int { func Hex(d []byte) string { return hex.EncodeToString(d) } +func FromHex(str string) []byte { + h, _ := hex.DecodeString(str) + return h +} |