mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-17 05:26:36 +00:00
Added hex method
This commit is contained in:
parent
bb3e28310e
commit
ba95849097
1 changed files with 4 additions and 0 deletions
|
|
@ -58,3 +58,7 @@ func MatchingNibbleLength(a, b []int) int {
|
||||||
func Hex(d []byte) string {
|
func Hex(d []byte) string {
|
||||||
return hex.EncodeToString(d)
|
return hex.EncodeToString(d)
|
||||||
}
|
}
|
||||||
|
func ToHex(str string) []byte {
|
||||||
|
h, _ := hex.DecodeString(str)
|
||||||
|
return h
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue