aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_hkdf.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hazmat/primitives/test_hkdf.py')
-rw-r--r--tests/hazmat/primitives/test_hkdf.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/hazmat/primitives/test_hkdf.py b/tests/hazmat/primitives/test_hkdf.py
index e33529c9..a05fd752 100644
--- a/tests/hazmat/primitives/test_hkdf.py
+++ b/tests/hazmat/primitives/test_hkdf.py
@@ -142,6 +142,17 @@ class TestHKDF(object):
hkdf.verify(b"foo", u"bar")
+ def test_derive_short_output(self, backend):
+ hkdf = HKDF(
+ hashes.SHA256(),
+ 4,
+ salt=None,
+ info=None,
+ backend=backend
+ )
+
+ assert hkdf.derive(b"\x01" * 16) == b"gJ\xfb{"
+
@pytest.mark.requires_backend_interface(interface=HMACBackend)
class TestHKDFExpand(object):