Converting ASCII to hex

Oh, I see. I didn't really think about my question thoroughly, because those other options didn't occur to me. I want:

byte nyData[8] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF};

And thanks to @PaulMurrayCbr and @GolamMostafa. The code (and the fix) does what I wanted. Much appreciated.

GolamMostafa:

Whandall:
So change the

PaulMurrayCbr:

char text[] = "1122334455667788";

char hex[8];
...