diff options
author | obscuren <geffobscura@gmail.com> | 2014-02-18 08:32:20 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-02-18 08:32:20 +0800 |
commit | ba95849097f7a35d9f315a4f2e340d3ef944a306 (patch) | |
tree | 4c754a1baf045ce74c9bec9ad4623f71cc347749 /ethutil/helpers.go | |
parent | bb3e28310ee3c2cfc5b3153510d4a1d220a22e81 (diff) | |
download | dexon-ba95849097f7a35d9f315a4f2e340d3ef944a306.tar dexon-ba95849097f7a35d9f315a4f2e340d3ef944a306.tar.gz dexon-ba95849097f7a35d9f315a4f2e340d3ef944a306.tar.bz2 dexon-ba95849097f7a35d9f315a4f2e340d3ef944a306.tar.lz dexon-ba95849097f7a35d9f315a4f2e340d3ef944a306.tar.xz dexon-ba95849097f7a35d9f315a4f2e340d3ef944a306.tar.zst dexon-ba95849097f7a35d9f315a4f2e340d3ef944a306.zip |
Added hex method
Diffstat (limited to 'ethutil/helpers.go')
-rw-r--r-- | ethutil/helpers.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ethutil/helpers.go b/ethutil/helpers.go index 2e3aeb9a3..11a474081 100644 --- a/ethutil/helpers.go +++ b/ethutil/helpers.go @@ -58,3 +58,7 @@ func MatchingNibbleLength(a, b []int) int { func Hex(d []byte) string { return hex.EncodeToString(d) } +func ToHex(str string) []byte { + h, _ := hex.DecodeString(str) + return h +} |