mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37:35 +00:00
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:
parent
5963f6f9ff
commit
f4e6f58cc6
5 changed files with 16 additions and 15 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue