Hex is suitable.
Get the arithmetic right, and you get the encoding right.
Just don't use base64.
Base64 is a big-endian file encoding scheme that takes the data to be encoded and splits it up into groups of 24 bits (3 words of 8 bits). If there's any slop, base64 encoding pads it on the little end. Emphatically not what you want.