diff options
author | Eli Collins <elic@assurancetechnologies.com> | 2011-12-28 17:15:31 -0500 |
---|---|---|
committer | Eli Collins <elic@assurancetechnologies.com> | 2011-12-28 17:15:31 -0500 |
commit | 9d1ca56acb757a034d66eb0b97acf0ca06245146 (patch) | |
tree | 4a08b829d3a70d0430aa5dfbb03cac96238dcec5 /passlib/handlers/misc.py | |
parent | dce7529fa18ab75cc42df175abee660836326ea5 (diff) | |
download | passlib-9d1ca56acb757a034d66eb0b97acf0ca06245146.tar.gz |
deprecated to_hash_str, replaced all instances with to_native_str
decided that to_hash_str will always return native string,
feature of hashes being returned as unicode under python 2
is better done through a CryptContext option.
Diffstat (limited to 'passlib/handlers/misc.py')
-rw-r--r-- | passlib/handlers/misc.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/passlib/handlers/misc.py b/passlib/handlers/misc.py index 80910af..3ba83e2 100644 --- a/passlib/handlers/misc.py +++ b/passlib/handlers/misc.py @@ -8,7 +8,7 @@ import logging; log = logging.getLogger(__name__) from warnings import warn #site #libs -from passlib.utils import to_hash_str, handlers as uh, bytes +from passlib.utils import to_native_str, handlers as uh, bytes #pkg #local __all__ = [ @@ -47,7 +47,7 @@ class unix_fallback(uh.StaticHandler): raise TypeError("secret must be string") if hash is None: raise ValueError("no hash provided") - return to_hash_str(hash) + return to_native_str(hash) @classmethod def verify(cls, secret, hash, enable_wildcard=False): @@ -70,7 +70,7 @@ class plaintext(uh.StaticHandler): def genhash(cls, secret, hash): if secret is None: raise TypeError("secret must be string") - return to_hash_str(secret, "utf-8") + return to_native_str(secret, "utf-8") @classmethod def _norm_hash(cls, hash): |