Hex to Base64 conversion in Python
Edit 26 Aug 2020: As suggested by Ali in the comments, using codecs.encode(b, “base64”) would result in extra line breaks for MIME syntax. Only use this method if you do want those line breaks formatting. For a plain Base64 encoding/decoding, use base64.b64encode and base64.b64decode. See the answer from Ali for details. In Python 3, arbitrary … Read more