macosxhints – Use OpenSSL for Base64 encode and decode
With reference to the Archive attachments from Mail.app messages hint, we can use OpenSSL to convert a specific Mail attachment from Base64 and back using the following command(s):
To decode from Base64:
openssl base64 -d -in <infile> -out <outfile>
Conversely, to encode to Base64:
openssl base64 -in <infile> -out <outfile>
Where infile refers to the input filename (source) and outfile refers to the output filename (destination). Refer to man enc for more detailed information on using OpenSSL commands.
-
You forgot to HTML-entity encode the angle brackets. Your infile and outfiles are missing from this description!
-
You can also use base64 from Mac Ports. Install mac ports.
Search for the base64 binary:
> port search base64
base64 mail/base64 1.3 Encode and decode base64 files
and then install it:
> sudo port install base64

4 comments
Comments feed for this article