[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: base64 tool?
From: |
Simon Josefsson |
Subject: |
Re: base64 tool? |
Date: |
Tue, 28 Dec 2004 04:23:28 +0100 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) |
Philip Rowlands <address@hidden> writes:
> There's the "base64" openssl applet, which can use argv[0]:
>
> $ ln -s /usr/bin/openssl base64
> $ echo "This is a test" | ./base64
> VGhpcyBpcyBhIHRlc3QK
> $ echo VGhpcyBpcyBhIHRlc3QK | openssl base64 -d
> This is a test
Right, although it doesn't have customizable line wrapping. Nor is it
as standalone as most of the coreutils tools are...
Jim Meyering <address@hidden> writes:
>> Is a base64 encode/decode tool suitable for coreutils?
>
> As Padraig noted, GNU recode does this:
>
> $ echo foo|recode ../64
> Zm9vCg==
> $ echo foo|recode ../64|recode /64
> foo
>
> but I find the syntax to be obscure.
> And it's not always available.
Agreed.
FWIW, I have written a base64 tool to satisfy my needs. It is based
on the coreutils code style. If at some point in time, the need for a
base64 tool in coreutils arise, it should not be difficult to adapt my
implementation.
http://josefsson.org/base64/
http://josefsson.org/cgi-bin/viewcvs.cgi/base64/src/base64.c?view=markup
Thanks,
Simon