def hex_encode(input, errors='strict'): return (serial.to_bytes([int(h, 16) for h in input.split()]), len(input))