diff options
| author | Eli Collins <elic@assurancetechnologies.com> | 2016-02-10 14:27:53 -0500 |
|---|---|---|
| committer | Eli Collins <elic@assurancetechnologies.com> | 2016-02-10 14:27:53 -0500 |
| commit | 7b598fe89d604ef91efd4f71253ffb9ab0aae7c5 (patch) | |
| tree | 1f732aa6364a37e3e18e5d0788eda208f95219d1 /passlib/utils/__init__.py | |
| parent | 590aef9ab3d872830ca27d95833e78c737fccd2d (diff) | |
| download | passlib-7b598fe89d604ef91efd4f71253ffb9ab0aae7c5.tar.gz | |
relocated many of the crypto routes inside passlib.utils,
and moved them to a separate passlib.crypto subpackage.
along with this move, made a few api cleanups:
* unified all code that's looking up hashes
to use new passlib.crypto.lookup_hash() wrapper, which takes
care of hash name normalization, loading fallback implementations,
and alg metadata inspection, all hidden behind a memoized function.
* deprecated pbkdf2() in favor of pbkdf2_hmac() -- only real use,
and new signature matches stdlib function. additionally,
this version is a bit faster, due to some assumptions that
can be made due to the PRF always being HMAC based.
* added compile_hmac() helper which does an even more efficient
job of pre-compiling a keyed HMAC function; this helped speed up pbkdf2 a bit more.
Diffstat (limited to 'passlib/utils/__init__.py')
| -rw-r--r-- | passlib/utils/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/passlib/utils/__init__.py b/passlib/utils/__init__.py index 1f703b4..3bfa08c 100644 --- a/passlib/utils/__init__.py +++ b/passlib/utils/__init__.py @@ -134,7 +134,7 @@ class classproperty(object): return self.im_func def deprecated_function(msg=None, deprecated=None, removed=None, updoc=True, - replacement=None, _is_method=False): + replacement=None, _is_method=False, func_module=None): """decorator to deprecate a function. :arg msg: optional msg, default chosen if omitted @@ -157,7 +157,7 @@ def deprecated_function(msg=None, deprecated=None, removed=None, updoc=True, msg += "." def build(func): opts = dict( - mod=func.__module__, + mod=func_module or func.__module__, name=func.__name__, deprecated=deprecated, removed=removed, |
