Commit ba958490 authored by obscuren's avatar obscuren

Added hex method

parent bb3e2831
...@@ -58,3 +58,7 @@ func MatchingNibbleLength(a, b []int) int { ...@@ -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
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment