[issue16995] Add Base32 support for RFC4648 "Extended Hex" alphabet (patch attached)
New submission from Matthäus Wander: RFC4648 specifies two different alphabets for Base32: 1) the common one already used in RFC3548 and implemented in Python, and 2) an "Extended Hex" alphabet which is used by e.g. DNSSEC NSEC3 but not yet implemented in Python. The attached patches add the "Extended Hex" alphabet to Python 2.7 and 3 via an optional parameter 'base32hex=False'. Default behavior is not changed. patch Lib/base64.py < py27_base64.patch patch Lib/test/test_base64.py < py27_test_base64.patch -- components: Library (Lib) files: base32hex.tar.gz messages: 180206 nosy: matthaeus.wander priority: normal severity: normal status: open title: Add Base32 support for RFC4648 "Extended Hex" alphabet (patch attached) type: enhancement versions: Python 2.7, Python 3.5 Added file: http://bugs.python.org/file28771/base32hex.tar.gz ___ Python tracker <http://bugs.python.org/issue16995> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16995] Add Base32 support for RFC4648 "Extended Hex" alphabet (patch attached)
Matthäus Wander added the comment: Added single patch as requested. -- keywords: +patch Added file: http://bugs.python.org/file28772/py3_base32hex.patch ___ Python tracker <http://bugs.python.org/issue16995> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16995] Add Base32 support for RFC4648 "Extended Hex" alphabet (patch attached)
Matthäus Wander added the comment: I've created a new patch that works against the current 3.5 sources. Should be fine for 3.6, I guess. Separate functions b32hexencode and b32hexdecode are used now. There is no optional parameter "base32hex" anymore. -- versions: +Python 3.6 -Python 3.5 Added file: http://bugs.python.org/file39981/py3_base32hex.patch ___ Python tracker <http://bugs.python.org/issue16995> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16995] Add Base32 support for RFC4648 "Extended Hex" alphabet (patch attached)
Matthäus Wander added the comment: *facepalm* Yes, I uploaded the old patch twice. Sorry for that. - Added doc update. - Added test case that includes all 32 characters codes. I'm reusing the existing Base32 table generation logic without changes. It has been changed (in 3.4 or so) since the first patch. If the logic is still to be changed as suggested by Martin in Rietveld review, I'd suggest to open a separate issue because it affects the existing Base32 implementation, too. -- Added file: http://bugs.python.org/file39995/py36_base32hex.patch ___ Python tracker <http://bugs.python.org/issue16995> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com