On Tue, Jun 07, 2005 at 08:23:18PM -0700, Pavel Pergamenshchik wrote:
> Hi.
> Is this a feature? I do see b32encode padding the string with NULs first.
> 
> >>> b32decode(b32encode('\x00'))
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/python2.4/base64.py", line 228, in b32decode
>     last = binascii.unhexlify(hex(acc)[2:-1])
> TypeError: Odd-length string

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

Jeff

Attachment: pgpYoIR86pYL4.pgp
Description: PGP signature

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to