PyDocs

Nav

Internet Data Handling

b32decode

base64

function (source)
  • b32decode(s, casefold=False, map01=None, *, padded=True, ignorechars=b'', canonical=False)
Decode the base32 encoded bytes-like object or ASCII string s.

Optional casefold is a flag specifying whether a lowercase alphabet is
acceptable as input.  For security purposes, the default is False.

If padded is false, padding in input is not required.

ignorechars should be a byte string containing characters to ignore
from the input.

RFC 4648 allows for optional mapping of the digit 0 (zero) to the
letter O (oh), and for optional mapping of the digit 1 (one) to
either the letter I (eye) or letter L (el).  The optional argument
map01 when not None, specifies which letter the digit 1 should be
mapped to (when map01 is not None, the digit 0 is always mapped to
the letter O).  For security purposes the default is None, so that
0 and 1 are not allowed in the input.

The result is returned as a bytes object.  A binascii.Error is raised if
the input is incorrectly padded or if there are non-alphabet
characters present in the input.
Changed in 3.15
  • 3.15: Added the canonical, ignorechars, and padded parameters.
0 Examples
No examples for base64/b32decode.
See Also
No see-alsos for base64/b32decode
0 Notes
No notes for b32decode