Christoph Krammer <[EMAIL PROTECTED]> wrote: >On 12 Okt., 17:09, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >> If you get an incorrect padding error, try appending a "=" and decoding >> again. If you get the error again, try appending one more "=". If it >> still doesn't work, then you might be out of luck. > >This seems to work in some cases, but not all. Whats the deal with >this adding of "="? Is there an implementation error in python, or are >other implemenations of base64 more robust then they have to be?
The base64 algorithm converts 3 incoming bytes to 4 encoded bytes. When you decode base64, the input string MUST be a multiple of 4 bytes. Equal signs are used to pad the strings to 4n bytes. The web site you used might be doing that alignment for you. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list