Bo Borgerson <[EMAIL PROTECTED]> wrote:
> Christopher Kerr wrote:
>> After being burned by using `head -c6 /dev/urandom | base64` as part of a
>> directory name, I realised that it would be useful if base64 had an option to
>> generate URL and Filename safe encodings, as specified in RFC 3548 section 4.
>>
>> This would make
>> cat FILE | base64 --filename-safe
>> equivalent to
>> cat FILE | base64 | tr '+/' '-_'
>> using the current coreutils tools.
>
> Hi,
>
> lib/base64.c looks fairly easy to pull apart so that current functions
> base64_encode and base64_decode become wrappers around internal
> functions that take an additional argument describing the alphabet.
>
> New functions base64_encode_filesafe and base64_decode_filesafe could
> then be added without breaking the pre-existing interface or duplicating
> a lot of code.

Beware:
there are two versions of base64.c.
The one in gnulib and another in coreutils/gl/lib.

Simon and I have been thinking about how to merge these
two for some time, but I haven't found time since our last exchange.

Volunteers welcome ;-)


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to