mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-06 03:15:03 +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 {
|
||||
return hex.EncodeToString(d)
|
||||
}
|
||||
func ToHex(str string) []byte {
|
||||
h, _ := hex.DecodeString(str)
|
||||
return h
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue