In my current project, I’ve had need to encode data in Base64 format for network transmission. Since I don’t want to reimplement things that are already available, I’ve seen libraries like Apache Commons Codec for Java. But I recently stumbled across a neat idea, especially when using shell scripts: OpenSSL can do Base64 encoding. It can do just that by using base64 as a cipher name, or it can use a real encryption cipher and then Base64-encode the encrypted content. Thanks to Van Emery for pointing that out. OpenSSL should be available in almost all Linux/Unix distributions, and can even go on Windows natively or via cygwin.