diff options
author | Ayrx <terrycwk1994@gmail.com> | 2014-05-09 14:48:06 +0800 |
---|---|---|
committer | Ayrx <terrycwk1994@gmail.com> | 2014-05-09 14:48:06 +0800 |
commit | 2d6cd449f1ad3448798d77d9216aded95b861a8d (patch) | |
tree | fca1dbbb85e0e2ad89d003cc502ef8d244a41bc6 /cryptography | |
parent | ac1a079f9baf441c262fd11628f3e3d06f73129d (diff) | |
download | cryptography-2d6cd449f1ad3448798d77d9216aded95b861a8d.tar.gz cryptography-2d6cd449f1ad3448798d77d9216aded95b861a8d.tar.bz2 cryptography-2d6cd449f1ad3448798d77d9216aded95b861a8d.zip |
Minor fixes
Diffstat (limited to 'cryptography')
-rw-r--r-- | cryptography/hazmat/primitives/kdf/hkdf.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/cryptography/hazmat/primitives/kdf/hkdf.py b/cryptography/hazmat/primitives/kdf/hkdf.py index d49cc5bd..daa8fcc7 100644 --- a/cryptography/hazmat/primitives/kdf/hkdf.py +++ b/cryptography/hazmat/primitives/kdf/hkdf.py @@ -45,8 +45,6 @@ class HKDF(object): self._backend = backend - self._used = False - self._hkdf_expand = HKDFExpand(self._algorithm, length, info, backend) def _extract(self, key_material): @@ -61,10 +59,6 @@ class HKDF(object): "material." ) - if self._used: - raise AlreadyFinalized - - self._used = True return self._hkdf_expand.derive(self._extract(key_material)) def verify(self, key_material, expected_key): @@ -73,7 +67,7 @@ class HKDF(object): @utils.register_interface(interfaces.KeyDerivationFunction) -class HKDFExpand(HKDF): +class HKDFExpand(object): def __init__(self, algorithm, length, info, backend): if not isinstance(backend, HMACBackend): raise UnsupportedAlgorithm( |