[Python-Dev] b32encode and NUL bytes

A.M. Kuchling amk at amk.ca
Sat Jun 11 13:08:35 CEST 2005


On Fri, Jun 10, 2005 at 01:13:35PM -0500, Jeff Epler wrote:
> > Is this a feature? I do see b32encode padding the string with NULs first.

This is bug #1170331, which was fixed when I applied patch #1171487
earlier this week.

> This also seems suspect:
> >>> base64.b32encode("\0a")
> 'ABQQ===='
> >>> base64.b32decode(_)
> 'a'

This case is also fixed in CVS.

--amk


More information about the Python-Dev mailing list