aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_utils.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-10-29 10:53:57 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2013-10-29 10:53:57 -0700
commit89546af52b8f8a6fc2fba520377906b4010c9037 (patch)
tree5bb161d84c93e16db187b18f5d60e651198f7185 /tests/test_utils.py
parent3944a8ce014f9f665a2300e1fa994b872cffa92b (diff)
parenta9d9922f82d4e7b940679c4b548a4b14d0958ed9 (diff)
downloadcryptography-89546af52b8f8a6fc2fba520377906b4010c9037.tar.gz
cryptography-89546af52b8f8a6fc2fba520377906b4010c9037.tar.bz2
cryptography-89546af52b8f8a6fc2fba520377906b4010c9037.zip
Merge branch 'master' into pkcs7-padding
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