summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2016-06-10 13:17:40 -0400
committerEli Collins <elic@assurancetechnologies.com>2016-06-10 13:17:40 -0400
commit5b451592878d2654acdd8fa9fdd53f35b0d2a3fe (patch)
treec32436429fbf113bf3ff2f813b15275f08780780
parent281dacd121d72c7570442a13f2113f63c6c439ba (diff)
downloadpasslib-5b451592878d2654acdd8fa9fdd53f35b0d2a3fe.tar.gz
passlib.crypto: relocated bcrypt backend code from passlib.utils
-rw-r--r--LICENSE2
-rw-r--r--passlib/crypto/_blowfish/__init__.py (renamed from passlib/utils/_blowfish/__init__.py)4
-rw-r--r--passlib/crypto/_blowfish/_gen_files.py (renamed from passlib/utils/_blowfish/_gen_files.py)6
-rw-r--r--passlib/crypto/_blowfish/base.py (renamed from passlib/utils/_blowfish/base.py)2
-rw-r--r--passlib/crypto/_blowfish/unrolled.py (renamed from passlib/utils/_blowfish/unrolled.py)4
-rw-r--r--passlib/handlers/bcrypt.py2
-rw-r--r--setup.py15
7 files changed, 12 insertions, 23 deletions
diff --git a/LICENSE b/LICENSE
index 87792f1..b0dd4df 100644
--- a/LICENSE
+++ b/LICENSE
@@ -83,7 +83,7 @@ It is available under the following license::
jBCrypt
-------
-The source file ``passlib/utils/_blowfish/base.py`` contains code derived
+The source file ``passlib/crypto/_blowfish/base.py`` contains code derived
from `jBcrypt 0.2 <http://www.mindrot.org/projects/jBCrypt/>`_, a Java
implementation of the BCrypt password hash algorithm. It is available under
a BSD/ISC license::
diff --git a/passlib/utils/_blowfish/__init__.py b/passlib/crypto/_blowfish/__init__.py
index 87a37cf..57cb9f2 100644
--- a/passlib/utils/_blowfish/__init__.py
+++ b/passlib/crypto/_blowfish/__init__.py
@@ -1,4 +1,4 @@
-"""passlib.utils._blowfish - pure-python eks-blowfish implementation for bcrypt
+"""passlib.crypto._blowfish - pure-python eks-blowfish implementation for bcrypt
This is a pure-python implementation of the EKS-Blowfish algorithm described by
Provos and Mazieres in `A Future-Adaptable Password Scheme
@@ -56,7 +56,7 @@ import struct
# pkg
from passlib.utils import bcrypt64, getrandbytes, rng
from passlib.utils.compat import BytesIO, unicode, u, native_string_types
-from passlib.utils._blowfish.unrolled import BlowfishEngine
+from passlib.crypto._blowfish.unrolled import BlowfishEngine
# local
__all__ = [
'BlowfishEngine',
diff --git a/passlib/utils/_blowfish/_gen_files.py b/passlib/crypto/_blowfish/_gen_files.py
index a8fca48..2f92cf8 100644
--- a/passlib/utils/_blowfish/_gen_files.py
+++ b/passlib/crypto/_blowfish/_gen_files.py
@@ -1,4 +1,4 @@
-"""passlib.utils._blowfish._gen_files - meta script that generates unrolled.py"""
+"""passlib.crypto._blowfish._gen_files - meta script that generates unrolled.py"""
#=============================================================================
# imports
#=============================================================================
@@ -161,7 +161,7 @@ def main():
fh.write(msg)
write(0, """\
- \"""passlib.utils._blowfish.unrolled - unrolled loop implementation of bcrypt,
+ \"""passlib.crypto._blowfish.unrolled - unrolled loop implementation of bcrypt,
autogenerated by _gen_files.py
currently this override the encipher() and expand() methods
@@ -171,7 +171,7 @@ def main():
# imports
#=================================================================
# pkg
- from passlib.utils._blowfish.base import BlowfishEngine as _BlowfishEngine
+ from passlib.crypto._blowfish.base import BlowfishEngine as _BlowfishEngine
# local
__all__ = [
"BlowfishEngine",
diff --git a/passlib/utils/_blowfish/base.py b/passlib/crypto/_blowfish/base.py
index b0a761e..7b4f2cb 100644
--- a/passlib/utils/_blowfish/base.py
+++ b/passlib/crypto/_blowfish/base.py
@@ -1,4 +1,4 @@
-"""passlib.utils._blowfish.base - unoptimized pure-python blowfish engine"""
+"""passlib.crypto._blowfish.base - unoptimized pure-python blowfish engine"""
#=============================================================================
# imports
#=============================================================================
diff --git a/passlib/utils/_blowfish/unrolled.py b/passlib/crypto/_blowfish/unrolled.py
index 7ce0bcc..4acf6e1 100644
--- a/passlib/utils/_blowfish/unrolled.py
+++ b/passlib/crypto/_blowfish/unrolled.py
@@ -1,4 +1,4 @@
-"""passlib.utils._blowfish.unrolled - unrolled loop implementation of bcrypt,
+"""passlib.crypto._blowfish.unrolled - unrolled loop implementation of bcrypt,
autogenerated by _gen_files.py
currently this override the encipher() and expand() methods
@@ -8,7 +8,7 @@ with optimized versions, and leaves the other base.py methods alone.
# imports
#=============================================================================
# pkg
-from passlib.utils._blowfish.base import BlowfishEngine as _BlowfishEngine
+from passlib.crypto._blowfish.base import BlowfishEngine as _BlowfishEngine
# local
__all__ = [
"BlowfishEngine",
diff --git a/passlib/handlers/bcrypt.py b/passlib/handlers/bcrypt.py
index 88b755a..95ce545 100644
--- a/passlib/handlers/bcrypt.py
+++ b/passlib/handlers/bcrypt.py
@@ -574,7 +574,7 @@ class bcrypt(uh.HasManyIdents, uh.HasRounds, uh.HasSalt, uh.HasManyBackends, uh.
return None
global _builtin_bcrypt
if _builtin_bcrypt is None:
- from passlib.utils._blowfish import raw_bcrypt as _builtin_bcrypt
+ from passlib.crypto._blowfish import raw_bcrypt as _builtin_bcrypt
return cls._calc_checksum_builtin
def _calc_checksum_builtin(self, secret, config):
diff --git a/setup.py b/setup.py
index 63313e0..36de737 100644
--- a/setup.py
+++ b/setup.py
@@ -15,7 +15,7 @@ import time
py3k = (sys.version_info[0] >= 3)
-from setuptools import setup
+from setuptools import setup, find_packages
#=============================================================================
# init setup options
@@ -130,18 +130,7 @@ else:
# XXX: could omit 'passlib._setup' from eggs, but not sdist
setup(
# package info
- packages = [
- "passlib",
- "passlib.crypto",
- "passlib.ext",
- "passlib.ext.django",
- "passlib.handlers",
- "passlib.tests",
- "passlib.utils",
- "passlib.utils._blowfish",
- "passlib.utils.compat",
- "passlib._setup",
- ],
+ packages = find_packages(root_dir),
package_data = { "passlib.tests": ["*.cfg"], "passlib":["_data/**"] },
zip_safe=True,