aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-28 21:25:53 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-28 21:25:53 -0600
commitd6b02d410370c439e662e8a2f5741a2d092bab8e (patch)
tree4e419cbbfe912cf9f7704f3921e30e194172c787
parent589b90826db025bcd7fc02e29b4831a09df3269d (diff)
downloadcryptography-d6b02d410370c439e662e8a2f5741a2d092bab8e.tar.gz
cryptography-d6b02d410370c439e662e8a2f5741a2d092bab8e.tar.bz2
cryptography-d6b02d410370c439e662e8a2f5741a2d092bab8e.zip
review fixes
-rw-r--r--cryptography/hazmat/primitives/kdf/pbkdf2.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/cryptography/hazmat/primitives/kdf/pbkdf2.py b/cryptography/hazmat/primitives/kdf/pbkdf2.py
index fec1d5c2..2c8dd541 100644
--- a/cryptography/hazmat/primitives/kdf/pbkdf2.py
+++ b/cryptography/hazmat/primitives/kdf/pbkdf2.py
@@ -30,7 +30,7 @@ class PBKDF2HMAC(object):
"{0} is not supported for PBKDF2 by this backend".format(
algorithm.name)
)
- self._called = False
+ self._used = False
self.algorithm = algorithm
self._length = length
if isinstance(salt, six.text_type):
@@ -43,10 +43,9 @@ class PBKDF2HMAC(object):
self._backend = backend
def derive(self, key_material):
- if self._called:
+ if self._used:
raise AlreadyFinalized("PBKDF2 instances can only be called once")
- else:
- self._called = True
+ self._used = True
if isinstance(key_material, six.text_type):
raise TypeError(