bpo-16995: add support for base32 extended hex (base32hex) (GH-20441)
cc @pganssle
Automerge-Triggered-By: @pganssle
diff --git a/Doc/library/base64.rst b/Doc/library/base64.rst
index 1ff22a0..2f24bb6 100644
--- a/Doc/library/base64.rst
+++ b/Doc/library/base64.rst
@@ -124,7 +124,7 @@
whether a lowercase alphabet is acceptable as input. For security purposes,
the default is ``False``.
- :rfc:`3548` allows for optional mapping of the digit 0 (zero) to the letter O
+ :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
@@ -136,6 +136,27 @@
input.
+.. function:: b32hexencode(s)
+
+ Similar to :func:`b32encode` but uses the Extended Hex Alphabet, as defined in
+ :rfc:`4648`.
+
+ .. versionadded:: 3.10
+
+
+.. function:: b32hexdecode(s, casefold=False)
+
+ Similar to :func:`b32decode` but uses the Extended Hex Alphabet, as defined in
+ :rfc:`4648`.
+
+ This version does not allow the digit 0 (zero) to the letter O (oh) and digit
+ 1 (one) to either the letter I (eye) or letter L (el) mappings, all these
+ characters are included in the Extended Hex Alphabet and are not
+ interchangable.
+
+ .. versionadded:: 3.10
+
+
.. function:: b16encode(s)
Encode the :term:`bytes-like object` *s* using Base16 and return the