Tools for base64 encoding