diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-10-18 21:42:57 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-10-18 21:43:17 -0500 |
commit | c179407406f0ef5c2b7b5b6316521408ba3803b3 (patch) | |
tree | f2cdb7322fdf3e6bd0428644dfd54587e0ef4516 /tests/primitives/test_hashes.py | |
parent | 3069921d3f1fe201f86e69bc50bf270708f2272a (diff) | |
download | cryptography-c179407406f0ef5c2b7b5b6316521408ba3803b3.tar.gz cryptography-c179407406f0ef5c2b7b5b6316521408ba3803b3.tar.bz2 cryptography-c179407406f0ef5c2b7b5b6316521408ba3803b3.zip |
ripemd160 support + long string hash test
* Note that the long string hash test for RIPEMD160 adds a vector in the
test. You can verify this vector (for b"a" * 1000000) on the RIPE
homepage: http://homes.esat.kuleuven.be/~bosselae/ripemd160.html
Diffstat (limited to 'tests/primitives/test_hashes.py')
-rw-r--r-- | tests/primitives/test_hashes.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/primitives/test_hashes.py b/tests/primitives/test_hashes.py index 2f2dd1c7..bfb45037 100644 --- a/tests/primitives/test_hashes.py +++ b/tests/primitives/test_hashes.py @@ -66,3 +66,13 @@ class TestSHA512(object): only_if=lambda api: api.supports_hash(hashes.SHA512), skip_message="Does not support SHA512", ) + + +class TestRIPEMD160(object): + test_RIPEMD160 = generate_base_hash_test( + hashes.RIPEMD160, + digest_size=20, + block_size=64, + only_if=lambda api: api.supports_hash(hashes.RIPEMD160), + skip_message="Does not support RIPEMD160", + ) |