[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7
Marc-Andre Lemburg
report at bugs.python.org
Mon May 19 11:20:38 CEST 2014
Marc-Andre Lemburg added the comment:
Some comments:
* Python 2.7 ships with OpenSSL 0.9.8 on Windows, so the Python version will always get used on that platform, so it needs to be fast.
* The iterations loop should use xrange instead of range
* The .encode('ascii') in _long_to_bin() is not necessary in Python 2
* Given that _long_to_bin() and _bin_to_long() are only used once in the function, it's better to inline the code directly.
* bytes(buffer()) should not be necessary in Python 2, since objects with a buffer interface will usually also implement the tp_str slot used by bytes().
----------
nosy: +lemburg
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21304>
_______________________________________
More information about the Python-bugs-list
mailing list