[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: base64 decoding more tolerant to chars

From: Bruno Haible
Subject: Re: base64 decoding more tolerant to chars
Date: Tue, 31 Jan 2012 11:55:12 +0100
User-agent: KMail/4.7.4 (Linux/3.1.0-1.2-desktop; KDE/4.7.4; x86_64; ; )

Jim Meyering wrote:
> >  Could also be done, but since the code to remove newlines was there, I
> > thought it is simpler to augment it to remove common garbage.
> I am reluctant to make this low-level decoding function ignore anything
> else.

I agree. If you remove the garbage unconditionally, you have lost the
functionality of doing strict checking of the input. If you add a 'bool'
parameter that determines whether the remove it, you have added complexity
in the interface (.h file) for nearly nothing.

Keep separate tasks in separate code.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]