encoding.hex #

fn decode #

fn decode(s string) ?[]byte

decode converts a hex string into an array of bytes. The expected input format is 2 ASCII characters for each output byte. If the provided string length is not a multiple of 2, an implicit 0 is prepended to it.

fn encode #

fn encode(bytes []byte) string

encode converts an array of bytes into a string of ASCII hex bytes. The output will always be a string with length a multiple of 2.