Added hex method

This commit is contained in:
obscuren 2014-02-18 01:32:20 +01:00
parent bb3e28310e
commit ba95849097
1 changed files with 4 additions and 0 deletions

View File

@ -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
}