aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-28 13:13:48 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-28 13:13:48 -0600
commit695313ff7cb1a7026a2624b8c61d495978d6f41c (patch)
tree6b32707e0bb01ded54fd0114cfebb47b3ea68d45
parent5d1af21519c728f1514efc1018eb427e7fb18559 (diff)
downloadcryptography-695313ff7cb1a7026a2624b8c61d495978d6f41c.tar.gz
cryptography-695313ff7cb1a7026a2624b8c61d495978d6f41c.tar.bz2
cryptography-695313ff7cb1a7026a2624b8c61d495978d6f41c.zip
remove length check (which cffi handles)
-rw-r--r--cryptography/hazmat/primitives/kdf/pbkdf2.py2
-rw-r--r--tests/hazmat/primitives/test_pbkdf2.py4
2 files changed, 0 insertions, 6 deletions
diff --git a/cryptography/hazmat/primitives/kdf/pbkdf2.py b/cryptography/hazmat/primitives/kdf/pbkdf2.py
index 27f9c7e2..1cc35f60 100644
--- a/cryptography/hazmat/primitives/kdf/pbkdf2.py
+++ b/cryptography/hazmat/primitives/kdf/pbkdf2.py
@@ -29,8 +29,6 @@ class PBKDF2(object):
)
self._called = False
self.algorithm = algorithm
- if length > 2**31 - 1:
- raise ValueError("Requested length too large.")
self._length = length
self._salt = salt
self.iterations = iterations
diff --git a/tests/hazmat/primitives/test_pbkdf2.py b/tests/hazmat/primitives/test_pbkdf2.py
index 6dd10129..4d15d7a7 100644
--- a/tests/hazmat/primitives/test_pbkdf2.py
+++ b/tests/hazmat/primitives/test_pbkdf2.py
@@ -57,7 +57,3 @@ class TestPBKDF2(object):
kdf = PBKDF2(hashes.SHA1(), 20, b"salt", 10, default_backend())
with pytest.raises(InvalidKey):
kdf.verify(b"password2", key)
-
- def test_salt_too_long(self):
- with pytest.raises(ValueError):
- PBKDF2(hashes.SHA1(), 2**31, b"salt", 10, default_backend())