converting hex to base64