Hex input is interpreted incorrectly when an odd number of characters is used. For example, when fff is used as the input, it will cause the data to be 11111111 00001111.
Hex input with an odd length should probably just be rejected. In any case, the current behavior doesn't really make sense and is also inconsistent with what happens when just 1 hex digit is used as an input (f for example is interpreted as 00001111, which kinda makes sense, but by that logic fff should be interpreted as 00001111 11111111, not 11111111 00001111).