Convert hex to base 64