diff --git a/cairo/src/precompiles/ripemd160.cairo b/cairo/src/precompiles/ripemd160.cairo index c239db85..daa68536 100644 --- a/cairo/src/precompiles/ripemd160.cairo +++ b/cairo/src/precompiles/ripemd160.cairo @@ -445,7 +445,7 @@ func finish{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}( let len_8 = mswlen * 8; let (val_15) = uint32_or(factor, len_8); - let next_block = is_nn_le(55, len); + let next_block = is_nn_le(56, len); if (next_block == FALSE) { dict_write{dict_ptr=x}(14, val); dict_write{dict_ptr=x}(15, val_15); diff --git a/cairo/tests/src/precompiles/test_ripemd160.py b/cairo/tests/src/precompiles/test_ripemd160.py index 9a1bc44d..54608fae 100644 --- a/cairo/tests/src/precompiles/test_ripemd160.py +++ b/cairo/tests/src/precompiles/test_ripemd160.py @@ -1,6 +1,6 @@ import pytest from Crypto.Hash import RIPEMD160 -from hypothesis import given, settings +from hypothesis import example, given from hypothesis.strategies import binary from tests.utils.errors import cairo_error @@ -10,7 +10,7 @@ @pytest.mark.slow class TestRIPEMD160: @given(msg_bytes=binary(min_size=1, max_size=200)) - @settings(max_examples=3) + @example(msg_bytes=b"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmomnopnopq") def test_ripemd160_should_return_correct_hash(self, cairo_run, msg_bytes): precompile_hash = cairo_run("test__ripemd160", msg=list(msg_bytes))