encode return to base 64