Author: Richard Plangger <[email protected]>
Branch: py3.5
Changeset: r88964:2c2213836631
Date: 2016-12-08 10:36 +0100
http://bitbucket.org/pypy/pypy/changeset/2c2213836631/
Log: rename parameter name to hash_name on the pbkdf2_hmac method
diff --git a/lib_pypy/_hashlib/__init__.py b/lib_pypy/_hashlib/__init__.py
--- a/lib_pypy/_hashlib/__init__.py
+++ b/lib_pypy/_hashlib/__init__.py
@@ -142,12 +142,10 @@
globals()[_newname] = make_new_hash(_name, _newname)
if hasattr(lib, 'PKCS5_PBKDF2_HMAC'):
- #@unwrap_spec(name=str, password='bytes', salt='bytes', iterations=int,
- # w_dklen=WrappedDefault(None))
- def pbkdf2_hmac(name, password, salt, iterations, dklen=None):
- if not isinstance(name, str):
- raise TypeError("expected 'str' for name, but got %s" % type(name))
- c_name = _str_to_ffi_buffer(name)
+ def pbkdf2_hmac(hash_name, password, salt, iterations, dklen=None):
+ if not isinstance(hash_name, str):
+ raise TypeError("expected 'str' for name, but got %s" %
type(hash_name))
+ c_name = _str_to_ffi_buffer(hash_name)
digest = lib.EVP_get_digestbyname(c_name)
if digest == ffi.NULL:
raise ValueError("unsupported hash type")
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit