My attempt on converting ascii string to a base64 string