LibCrypto: Reset cached trimmed length after add_into_accumulator

The trimmed cache length of the `UnsignedBigInteger` was not reset after
an `add_into_accumulator_without_allocation` operation because the
function manipulates the words directly.

This meant that if the trimmed length was calculated before this
operation it would be wrong after.
This commit is contained in:
devgianlu 2024-12-15 16:02:51 +01:00 committed by Ali Mohammad Pur
parent 40bf8dde88
commit a74ef5df3d
Notes: github-actions[bot] 2024-12-15 22:33:06 +00:00

View file

@ -66,6 +66,8 @@ void UnsignedBigIntegerAlgorithms::add_into_accumulator_without_allocation(Unsig
// Note : The accumulator couldn't add the carry directly, so we reached its end
accumulator.m_words.append(last_carry_for_word);
}
accumulator.m_cached_trimmed_length = {};
}
/**