MCPcopy Index your code
hub / github.com/python/cpython / b32decode

Function b32decode

Lib/base64.py:233–243  ·  view source on GitHub ↗
(s, casefold=False, map01=None, *, padded=True, ignorechars=b'')

Source from the content-addressed store, hash-verified

231b32encode.__doc__ = _B32_ENCODE_DOCSTRING.format(encoding='base32')
232
233def b32decode(s, casefold=False, map01=None, *, padded=True, ignorechars=b''):
234 s = _bytes_from_decode_data(s)
235 # Handle section 2.4 zero and one mapping. The flag map01 will be either
236 # False, or the character to map the digit 1 (one) to. It should be
237 # either L (el) or I (eye).
238 if map01 is not None:
239 map01 = _bytes_from_decode_data(map01)
240 s = s.translate(bytes.maketrans(b'01', b'O' + map01))
241 if casefold:
242 s = s.upper()
243 return binascii.a2b_base32(s, padded=padded, ignorechars=ignorechars)
244b32decode.__doc__ = _B32_DECODE_DOCSTRING.format(encoding='base32',
245 extra_args=_B32_DECODE_MAP01_DOCSTRING)
246

Callers 1

checkMethod · 0.85

Calls 4

_bytes_from_decode_dataFunction · 0.85
maketransMethod · 0.80
translateMethod · 0.45
upperMethod · 0.45

Tested by 1

checkMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…