[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] base64: Allow URL-safe base64 strings to be decoded
From: |
Simon Josefsson |
Subject: |
Re: [PATCH] base64: Allow URL-safe base64 strings to be decoded |
Date: |
Thu, 02 Aug 2012 22:46:42 +0200 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/23.3 (gnu/linux) |
Bruno Haible <address@hidden> writes:
> Hi,
>
> Wido den Hollander wrote:
>> With URL-safe base64 the + and / are replaced by - and _
>>
>> This way we can accept base64 strings which are URL-safe.
>
> There are many more variants of base64, see
> http://en.wikipedia.org/wiki/Base64
>
> The current code is meant to implement RFC 4648. Since for RFC 4648 characters
> outside the alphabet are forbidden, your patch would break this use-case.
>
> I think if the module should be usable for other variants than RFC 4648,
> the proper implementation is to have an 'enum' that identifies the variant
> and to pass this enum as parameter to the functions isbase64, base64_encode,
> base64_decode_ctx, etc.
I agree. Note that RFC 4648 covers the URL-safe alphabet too, so the
code actually just implement a subset of RFC 4648 today.
/Simon
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH] base64: Allow URL-safe base64 strings to be decoded,
Simon Josefsson <=