aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography
diff options
context:
space:
mode:
authorDavid Reid <dreid@dreid.org>2014-01-30 15:28:09 -0800
committerDavid Reid <dreid@dreid.org>2014-02-03 10:05:28 -0800
commit15fd6433ea357fc6d06052db85c0d0140a9c1d13 (patch)
tree726763560e9c3927ea7d3dc839c41ae372b53862 /cryptography
parentc0248b9be0a207fe1b27690d819bd79ac3e1aa84 (diff)
downloadcryptography-15fd6433ea357fc6d06052db85c0d0140a9c1d13.tar.gz
cryptography-15fd6433ea357fc6d06052db85c0d0140a9c1d13.tar.bz2
cryptography-15fd6433ea357fc6d06052db85c0d0140a9c1d13.zip
Don't expose extract and expand on this class yet because we don't know how best to expose verify functionality, continue testing the stages using the private methods.
Diffstat (limited to 'cryptography')
-rw-r--r--cryptography/hazmat/primitives/kdf/hkdf.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/cryptography/hazmat/primitives/kdf/hkdf.py b/cryptography/hazmat/primitives/kdf/hkdf.py
index 2b5ba815..ae24f676 100644
--- a/cryptography/hazmat/primitives/kdf/hkdf.py
+++ b/cryptography/hazmat/primitives/kdf/hkdf.py
@@ -57,27 +57,11 @@ class HKDF(object):
self._used = False
- def extract(self, key_material):
- if self._used:
- raise exceptions.AlreadyFinalized
-
- self._used = True
-
- return self._extract(key_material)
-
def _extract(self, key_material):
h = hmac.HMAC(self._salt, self._algorithm, backend=self._backend)
h.update(key_material)
return h.finalize()
- def expand(self, key_material):
- if self._used:
- raise exceptions.AlreadyFinalized
-
- self._used = True
-
- return self._expand(key_material)
-
def _expand(self, key_material):
output = [b""]
counter = 1