diff options
author | David Reid <dreid@dreid.org> | 2014-01-30 15:28:09 -0800 |
---|---|---|
committer | David Reid <dreid@dreid.org> | 2014-02-03 10:05:28 -0800 |
commit | 15fd6433ea357fc6d06052db85c0d0140a9c1d13 (patch) | |
tree | 726763560e9c3927ea7d3dc839c41ae372b53862 /tests/hazmat/primitives | |
parent | c0248b9be0a207fe1b27690d819bd79ac3e1aa84 (diff) | |
download | cryptography-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 'tests/hazmat/primitives')
-rw-r--r-- | tests/hazmat/primitives/test_hkdf.py | 18 | ||||
-rw-r--r-- | tests/hazmat/primitives/utils.py | 4 |
2 files changed, 2 insertions, 20 deletions
diff --git a/tests/hazmat/primitives/test_hkdf.py b/tests/hazmat/primitives/test_hkdf.py index f3345b05..66993f0e 100644 --- a/tests/hazmat/primitives/test_hkdf.py +++ b/tests/hazmat/primitives/test_hkdf.py @@ -71,24 +71,6 @@ class TestHKDF(object): backend=backend ) - hkdf.extract(b"\x01" * 16) - - with pytest.raises(exceptions.AlreadyFinalized): - hkdf.extract(b"\x02" * 16) - - hkdf = HKDF( - hashes.SHA256(), - 16, - salt=None, - info=None, - backend=backend - ) - - hkdf.expand(b"\x01" * 16) - - with pytest.raises(exceptions.AlreadyFinalized): - hkdf.expand(b"\x02" * 16) - def test_verify(self, backend): hkdf = HKDF( hashes.SHA256(), diff --git a/tests/hazmat/primitives/utils.py b/tests/hazmat/primitives/utils.py index 2584272a..5a8dc3ab 100644 --- a/tests/hazmat/primitives/utils.py +++ b/tests/hazmat/primitives/utils.py @@ -326,7 +326,7 @@ def hkdf_extract_test(backend, algorithm, params): backend=backend ) - prk = hkdf.extract(binascii.unhexlify(params["ikm"])) + prk = hkdf._extract(binascii.unhexlify(params["ikm"])) assert prk == binascii.unhexlify(params["prk"]) @@ -340,7 +340,7 @@ def hkdf_expand_test(backend, algorithm, params): backend=backend ) - okm = hkdf.expand(binascii.unhexlify(params["prk"])) + okm = hkdf._expand(binascii.unhexlify(params["prk"])) assert okm == binascii.unhexlify(params["okm"]) |