summaryrefslogtreecommitdiff
path: root/passlib/utils/pbkdf2.py
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2012-01-18 17:51:32 -0500
committerEli Collins <elic@assurancetechnologies.com>2012-01-18 17:51:32 -0500
commit666aa14bf15ed898472463d2ec890de0b8c60923 (patch)
treef4ad79fb817cdca19e64dbb1abfe86c1a2c8ffc1 /passlib/utils/pbkdf2.py
parentb6d904be92c77bce061c78034145958401bba381 (diff)
downloadpasslib-666aa14bf15ed898472463d2ec890de0b8c60923.tar.gz
import cleanups
* moved bytes compat functions from utils to utils.compat (bord, bjoin, bjoin_ints, bjoin_elems, ujoin) * renamed bord -> belem_ord for clarify * a bunch of to_native_str() always use ascii, and have fixed input types (always bytes or always unicode). these don't need overhead of to_native_str(), so replaced those calls with two new funcs: compat.bascii_to_str() / compat.uascii_to_str() * cleaned up a lot of imports from utils/utils.compat to pull from correct module * simplified the to_string() logic of a bunch of handlers to reduce unicode<->byte transitions
Diffstat (limited to 'passlib/utils/pbkdf2.py')
-rw-r--r--passlib/utils/pbkdf2.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/passlib/utils/pbkdf2.py b/passlib/utils/pbkdf2.py
index c48f751..c880457 100644
--- a/passlib/utils/pbkdf2.py
+++ b/passlib/utils/pbkdf2.py
@@ -20,9 +20,8 @@ try:
except ImportError:
_EVP = None
#pkg
-from passlib.utils import xor_bytes, to_bytes, b, bytes
-from passlib.utils.compat import irange, callable, int_types
-from passlib.utils.compat.aliases import BytesIO
+from passlib.utils import to_bytes, xor_bytes
+from passlib.utils.compat import b, bytes, BytesIO, irange, callable, int_types
#local
__all__ = [
"hmac_sha1",