decodeHex

Decodes this hexadecimal string into a byte array.

Both lower case (a to f) and upper case (A to F) digits are accepted, in any mix. Every pair of digits produces one byte, most significant nibble first. An empty string produces an empty array.

Return

the decoded bytes, with length equal to half the string length.

Throws

if the string length is odd, or if any character is not a valid hexadecimal digit.