Get base64 from a string