On 11/02/2015 10:24 a.m., Niels Möller wrote:
> Amos Jeffries writes:
> 
>> The attached patch implements a proposed API/ABI extension adding
>> support for RFC 4648 section 5 "Base 64 Encoding with URL and Filename
>> Safe Alphabet"
> 
> Committed now, with some edits. Thanks!
> 
> I also added a
> 
>   struct nettle_armor nettle_base64_url;
> 
> Looking at the base64_{en,de}code_ctx, maybe one could micro-optimize
> them while at it, like changing
> 
>   struct base64_decode_ctx
>   {
>     unsigned word;
>     unsigned bits;
>     unsigned padding;
>     const signed char *table;
>   };
> 
> (typically 16 bytes on 32-bit machines, 24 (incl. alignment padding) on
> 64-bit machines) to
> 
>   struct base64_decode_ctx
>   {
>     const signed char *table;
>     unsigned short word;
>     unsigned char bits;
>     unsigned char padding;
>   };
> 
> which would reduce the size to 8 and 16 bytes, respectively. At least, I
> think it's prettier to put the large pointer first in the struct.
> 

Agreed. I will leave that commit to you though since you seem to already
have the patch above.

Amos

_______________________________________________
nettle-bugs mailing list
[email protected]
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs

Reply via email to