Converts a hexadecimal string hex into a byte-array.
hex
The returned array length is len/2.
len
an hex string
the length of the hex string (it has to be even)
a array of bytes, or null on error
null