[issue21288] hashlib.pbkdf2_hmac Hash Constructor

Armin Ronacher report at bugs.python.org
Thu Apr 17 23:33:30 CEST 2014


Armin Ronacher added the comment:

> We can accept only hashlib functions, and continue passing their names 
> to the OpenSSL backend. A bit ugly and limited solution (no user-defined 
> hash functions) for a better looking API.
What I'm doing at the code for my employer is something similar.  There is a PBKDF2 implementation on top of the hmac module.  If a hashlib constructor is detected that OpenSSL implements it dispatches that to the PBKDF2 path in OpenSSL via ctypes.

Ultimately it's the same situation but it does not expose the implementation detail.

----------
versions: +Python 3.4 -Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21288>
_______________________________________


More information about the Python-bugs-list mailing list