From ba3b471e4b0f56e65acdb9d5daf64eb726d9c371 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Fri, 18 Oct 2013 20:53:04 -0500 Subject: change api.supports_hash to take a hash class rather than a str * This change means hash class names will be byte strings and we no longer need to encode to ascii on hashobject.name in create_hash_context --- tests/primitives/test_hash_vectors.py | 2 +- tests/primitives/test_hashes.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/primitives/test_hash_vectors.py b/tests/primitives/test_hash_vectors.py index 8198b086..9a925e27 100644 --- a/tests/primitives/test_hash_vectors.py +++ b/tests/primitives/test_hash_vectors.py @@ -30,6 +30,6 @@ class TestSHA1(object): "SHA1ShortMsg.rsp", ], hashes.SHA1, - only_if=lambda api: api.supports_hash("sha1"), + only_if=lambda api: api.supports_hash(hashes.SHA1), skip_message="Does not support SHA1", ) diff --git a/tests/primitives/test_hashes.py b/tests/primitives/test_hashes.py index 1bc2e9e9..4ad5c89a 100644 --- a/tests/primitives/test_hashes.py +++ b/tests/primitives/test_hashes.py @@ -23,6 +23,6 @@ class TestSHA1(object): hashes.SHA1, digest_size=20, block_size=64, - only_if=lambda api: api.supports_hash("sha1"), + only_if=lambda api: api.supports_hash(hashes.SHA1), skip_message="Does not support SHA1", ) -- cgit v1.2.3