[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2018-01-03 Thread Christian Heimes
Christian Heimes added the comment: I'm working on a hashing algorith v2.0 PEP. New hashing constructors and modules will have an allow_optimization flag and oid attribute. Once finalized and implemented, hashlib.pbkdf2_hmac() will support digestmod and digest constructors that have allow_opt

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2017-12-27 Thread Armin Ronacher
Armin Ronacher added the comment: I have no good solution. What I do so far is pretty much exactly what was originally reported here: https://github.com/pallets/werkzeug/blob/6922d883ba61c6884fa6cab5bfd280c5a60399af/werkzeug/security.py#L96-L104 -- __

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2017-12-27 Thread Christian Heimes
Christian Heimes added the comment: Do you have a proper solution that works within the limits of PEP 247? I could not, hence the existing API. -- ___ Python tracker ___ _

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2017-12-27 Thread Armin Ronacher
Armin Ronacher added the comment: Yes, I'm definitely still interested in this. I still carry this hack around. -- status: pending -> open ___ Python tracker ___ __

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2017-12-27 Thread Christian Heimes
Christian Heimes added the comment: Is anybody interested still to solve the problem? I don't see a viable way to solve the issue in a correct way (*). The hashlib API is not designed to provide sufficient information from a digestmod object. I don't want to include hacks like mapping _hashli

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2014-11-09 Thread Eric Beurre
Changes by Eric Beurre : -- nosy: +egbutter ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2014-04-17 Thread Armin Ronacher
Armin Ronacher added the comment: I understand that, but given that this API might be backported to 2.7 I think it should get further review. Also, this would only be a change to the error case. Non string arguments are currently being responded to with a TypeError. I am not proposing to rem

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2014-04-17 Thread Yury Selivanov
Yury Selivanov added the comment: Armin, FWIW, I don't think it's possible to push this API change in 3.4. -- ___ Python tracker ___ _

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2014-04-17 Thread Armin Ronacher
Armin Ronacher added the comment: I should add that we still support non OpenSSL hashers, but we go a different path. -- ___ Python tracker ___ _

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2014-04-17 Thread Armin Ronacher
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. The

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2014-04-17 Thread Yury Selivanov
Yury Selivanov added the comment: On 2014-04-17, 5:02 PM, Christian Heimes wrote: > Christian Heimes added the comment: > > A callable wouldn't work for the OpenSSL back end of PBKDF2. The function > takes a digest pointer. I have to think about a solution... > > Sorry for the brevity, I still d

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2014-04-17 Thread Christian Heimes
Christian Heimes added the comment: A callable wouldn't work for the OpenSSL back end of PBKDF2. The function takes a digest pointer. I have to think about a solution... Sorry for the brevity, I still don't have proper internet at home. On 17. April 2014 22:20:36 MESZ, Yury Selivanov wrote: >

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2014-04-17 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +christian.heimes, gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2014-04-17 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +yselivanov versions: +Python 3.5 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2014-04-17 Thread Donald Stufft
Donald Stufft added the comment: I agree that this change makes a lot of sense. -- nosy: +dstufft ___ Python tracker ___ ___ Python-bu

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2014-04-17 Thread Armin Ronacher
Armin Ronacher added the comment: This commit shows why the API is problematic: https://github.com/mitsuhiko/werkzeug/commit/c527dcbfb0ee621e9faa0a3a2873118438965800 -- ___ Python tracker _

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2014-04-17 Thread Alex Gaynor
Changes by Alex Gaynor : -- nosy: +alex ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2014-04-17 Thread Armin Ronacher
New submission from Armin Ronacher: Is there a specific reason why hashlib.pbkdf2_hmac now has a completely inconsistent API with the rest of the stdlib? So far the concept in both hashlib and hmac has been to accept hash constructors as parameters. As such you would expect the API to look li