Make sure hex is 0 padded and at least 2 characters wide.
Currently the binary to hex function can produce an invalid hex code, for example it may write \x1 instead of \x01 and \x1 is not a valid hex escape code.
Example here: https://play.golang.org/p/lgcm9PyfmG8
Make sure hex is 0 padded and at least 2 characters wide.
Currently the binary to hex function can produce an invalid hex code, for example it may write \x1 instead of \x01 and \x1 is not a valid hex escape code. Example here: https://play.golang.org/p/lgcm9PyfmG8