[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: base64 decoding more tolerant to chars
From: |
Jim Meyering |
Subject: |
Re: base64 decoding more tolerant to chars |
Date: |
Mon, 30 Jan 2012 22:29:00 +0100 |
Nikos Mavrogiannopoulos wrote:
> This patch makes the base64 decoding tolerant on carriage returns,
> spaces and tabs. It is quite common to find PEM encoded files (base64
> with new lines) containing such characters and having a tolerant decoder
> is a plus.
Hi Nikos,
Have you considered pre-filtering the data you pass to the base64-decoding
function? We considered what you're proposing when adding the
--ignore-garbage option to the command-line base64 program:
$ base64 --help
Usage: base64 [OPTION]... [FILE]
Base64 encode or decode FILE, or standard input, to standard output.
-d, --decode decode data
-i, --ignore-garbage when decoding, ignore non-alphabet characters