Rewrite of my simple base64 encoder