How to convert a String o another Hex String

to use minimal RAM you could use

char HexString[sizeof(msgArray) * 2 - 1]; //2 nibbles/byte + null terminator