(s, casefold=False, *, padded=True, ignorechars=b'')
| 250 | b32hexencode.__doc__ = _B32_ENCODE_DOCSTRING.format(encoding='base32hex') |
| 251 | |
| 252 | def b32hexdecode(s, casefold=False, *, padded=True, ignorechars=b''): |
| 253 | s = _bytes_from_decode_data(s) |
| 254 | # base32hex does not have the 01 mapping |
| 255 | if casefold: |
| 256 | s = s.upper() |
| 257 | return binascii.a2b_base32(s, alphabet=binascii.BASE32HEX_ALPHABET, |
| 258 | padded=padded, ignorechars=ignorechars) |
| 259 | b32hexdecode.__doc__ = _B32_DECODE_DOCSTRING.format(encoding='base32hex', |
| 260 | extra_args='') |
| 261 |