summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2013-05-13 23:39:50 -0400
committerDonald Stufft <donald@stufft.io>2013-05-13 23:49:00 -0400
commit8f0a4665d67868dce2e204dd592b0f133edf7943 (patch)
treeb1b96b693d9859a779f0832c3ac62ecf5727ce45 /django
parent1708c8afb6f07417da192bae93a828065858fb3c (diff)
Recommend using the bcrypt library instead of py-bcrypt
* py-bcrypt has not been updated in some time * py-bcrypt does not support Python3 * py3k-bcrypt, a port of py-bcrypt to python3 is not compatible with Django * bcrypt is supported on all versions of Python that Django supports
Diffstat (limited to 'django')
-rw-r--r--django/contrib/auth/hashers.py6
-rw-r--r--django/contrib/auth/tests/test_hashers.py4
2 files changed, 5 insertions, 5 deletions
diff --git a/django/contrib/auth/hashers.py b/django/contrib/auth/hashers.py
index 2e0fb0a034..6abdb5f476 100644
--- a/django/contrib/auth/hashers.py
+++ b/django/contrib/auth/hashers.py
@@ -263,13 +263,13 @@ class BCryptSHA256PasswordHasher(BasePasswordHasher):
Secure password hashing using the bcrypt algorithm (recommended)
This is considered by many to be the most secure algorithm but you
- must first install the py-bcrypt library. Please be warned that
+ must first install the bcrypt library. Please be warned that
this library depends on native C code and might cause portability
issues.
"""
algorithm = "bcrypt_sha256"
digest = hashlib.sha256
- library = ("py-bcrypt", "bcrypt")
+ library = ("bcrypt", "bcrypt")
rounds = 12
def salt(self):
@@ -329,7 +329,7 @@ class BCryptPasswordHasher(BCryptSHA256PasswordHasher):
Secure password hashing using the bcrypt algorithm
This is considered by many to be the most secure algorithm but you
- must first install the py-bcrypt library. Please be warned that
+ must first install the bcrypt library. Please be warned that
this library depends on native C code and might cause portability
issues.
diff --git a/django/contrib/auth/tests/test_hashers.py b/django/contrib/auth/tests/test_hashers.py
index 9253fcbc43..d49fdc412e 100644
--- a/django/contrib/auth/tests/test_hashers.py
+++ b/django/contrib/auth/tests/test_hashers.py
@@ -92,7 +92,7 @@ class TestUtilsHashPass(unittest.TestCase):
self.assertFalse(check_password('lètmeiz', encoded))
self.assertEqual(identify_hasher(encoded).algorithm, "crypt")
- @skipUnless(bcrypt, "py-bcrypt not installed")
+ @skipUnless(bcrypt, "bcrypt not installed")
def test_bcrypt_sha256(self):
encoded = make_password('lètmein', hasher='bcrypt_sha256')
self.assertTrue(is_password_usable(encoded))
@@ -108,7 +108,7 @@ class TestUtilsHashPass(unittest.TestCase):
self.assertTrue(check_password(password, encoded))
self.assertFalse(check_password(password[:72], encoded))
- @skipUnless(bcrypt, "py-bcrypt not installed")
+ @skipUnless(bcrypt, "bcrypt not installed")
def test_bcrypt(self):
encoded = make_password('lètmein', hasher='bcrypt')
self.assertTrue(is_password_usable(encoded))