summaryrefslogtreecommitdiff
path: root/lib/Crypto/Protocol
diff options
context:
space:
mode:
authorDwayne Litzenberger <dlitz@dlitz.net>2013-09-29 03:01:28 -0700
committerDwayne Litzenberger <dlitz@dlitz.net>2013-10-20 13:30:22 -0700
commitacbd4dedc88325c4799d5f4df8a2f8bc0a040479 (patch)
tree014e1f6bbcb6aab30b9712fde7f36122cf24106f /lib/Crypto/Protocol
parent0ae375d573ab5e2186664e08f9da179dbe078552 (diff)
downloadpycrypto-acbd4dedc88325c4799d5f4df8a2f8bc0a040479.tar.gz
More ValueError -> TypeError
Diffstat (limited to 'lib/Crypto/Protocol')
-rw-r--r--lib/Crypto/Protocol/KDF.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Crypto/Protocol/KDF.py b/lib/Crypto/Protocol/KDF.py
index 0a92c15..127be0c 100644
--- a/lib/Crypto/Protocol/KDF.py
+++ b/lib/Crypto/Protocol/KDF.py
@@ -81,7 +81,7 @@ def PBKDF1(password, salt, dkLen, count=1000, hashAlgo=None):
pHash = hashAlgo.new(password+salt)
digest = pHash.digest_size
if dkLen>digest:
- raise ValueError("Selected hash algorithm has a too short digest (%d bytes)." % digest)
+ raise TypeError("Selected hash algorithm has a too short digest (%d bytes)." % digest)
if len(salt)!=8:
raise ValueError("Salt is not 8 bytes long.")
for i in xrange(count-1):