non-working code to convert a hex string to base64