diff options
author | Donald Stufft <donald@stufft.io> | 2013-10-19 20:59:12 -0700 |
---|---|---|
committer | Donald Stufft <donald@stufft.io> | 2013-10-19 20:59:12 -0700 |
commit | 7abcb9c0e87787d58f4754c079a3296aaedae657 (patch) | |
tree | cef8d5454e951721ed92cd71c5e0b23c7ebc0551 /tests | |
parent | 1caf8ab5ec72d8373bc9af7a9f7b63c2ac0826f7 (diff) | |
parent | 746815b8f2b6a485b41e37c67969ed21338946db (diff) | |
download | cryptography-7abcb9c0e87787d58f4754c079a3296aaedae657.tar.gz cryptography-7abcb9c0e87787d58f4754c079a3296aaedae657.tar.bz2 cryptography-7abcb9c0e87787d58f4754c079a3296aaedae657.zip |
Merge pull request #130 from reaperhulk/hash-saga-thrilling-conclusion-md5
Hash Saga Part 7 (MD5 support + docs)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/primitives/test_hash_vectors.py | 13 | ||||
-rw-r--r-- | tests/primitives/test_hashes.py | 10 |
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/primitives/test_hash_vectors.py b/tests/primitives/test_hash_vectors.py index 52c972a3..02ef4dbb 100644 --- a/tests/primitives/test_hash_vectors.py +++ b/tests/primitives/test_hash_vectors.py @@ -131,3 +131,16 @@ class TestWhirlpool(object): only_if=lambda api: api.supports_hash(hashes.Whirlpool), skip_message="Does not support Whirlpool", ) + + +class TestMD5(object): + test_md5 = generate_hash_test( + load_hash_vectors_from_file, + os.path.join("RFC", "MD5"), + [ + "rfc-1321.txt", + ], + hashes.MD5, + only_if=lambda api: api.supports_hash(hashes.MD5), + skip_message="Does not support MD5", + ) diff --git a/tests/primitives/test_hashes.py b/tests/primitives/test_hashes.py index 982fc7cd..901ddabb 100644 --- a/tests/primitives/test_hashes.py +++ b/tests/primitives/test_hashes.py @@ -86,3 +86,13 @@ class TestWhirlpool(object): only_if=lambda api: api.supports_hash(hashes.Whirlpool), skip_message="Does not support Whirlpool", ) + + +class TestMD5(object): + test_MD5 = generate_base_hash_test( + hashes.MD5, + digest_size=16, + block_size=64, + only_if=lambda api: api.supports_hash(hashes.MD5), + skip_message="Does not support MD5", + ) |