LibCrypto: Add the UnsignedBigInteger::Word alias

This makes it clearer which variables are operating on words instead
of directly operating on raw values.
This commit is contained in:
DexesTTP
2021-05-12 13:25:55 +02:00
committed by Linus Groh
parent 5963f6f9ff
commit f4e6f58cc6
Notes: sideshowbarker 2024-07-18 18:13:48 +09:00
5 changed files with 16 additions and 15 deletions

View File

@@ -54,12 +54,12 @@ FLATTEN void UnsignedBigIntegerAlgorithms::divide_without_allocation(
*/
FLATTEN void UnsignedBigIntegerAlgorithms::divide_u16_without_allocation(
UnsignedBigInteger const& numerator,
u32 denominator,
UnsignedBigInteger::Word denominator,
UnsignedBigInteger& quotient,
UnsignedBigInteger& remainder)
{
VERIFY(denominator < (1 << 16));
u32 remainder_word = 0;
UnsignedBigInteger::Word remainder_word = 0;
auto numerator_length = numerator.trimmed_length();
quotient.set_to_0();
quotient.m_words.resize(numerator_length);