aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r--tests/test_utils.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py
index f96cf004..db9ac085 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -411,6 +411,22 @@ def test_load_hash_vectors():
]
+def test_load_hmac_vectors():
+ vector_data = textwrap.dedent("""
+Len = 224
+# "Jefe"
+Key = 4a656665
+# "what do ya want for nothing?"
+Msg = 7768617420646f2079612077616e7420666f72206e6f7468696e673f
+MD = 750c783e6ab0b503eaa86e310a5db738
+ """).splitlines()
+ assert load_hash_vectors(vector_data) == [
+ (b"7768617420646f2079612077616e7420666f72206e6f7468696e673f",
+ "750c783e6ab0b503eaa86e310a5db738",
+ b"4a656665"),
+ ]
+
+
def test_load_hash_vectors_bad_data():
vector_data = textwrap.dedent("""
# http://tools.ietf.org/html/rfc1321