LibCrypto: Make the constructors of (Un)SignedBigInteger templated

This means it can take any (un)signed word of size at most Word.
This means the constructor can be disambiguated if we were to add a
double constructor :^).

This requires a change in just one test.
This commit is contained in:
davidot 2022-08-25 23:35:34 +02:00 committed by Linus Groh
commit c87d10365b
Notes: sideshowbarker 2024-07-17 07:42:50 +09:00
3 changed files with 13 additions and 5 deletions

View file

@ -73,7 +73,7 @@ TEST_CASE(test_unsigned_bigint_basic_add_to_accumulator)
TEST_CASE(test_unsigned_bigint_basic_add_to_empty_accumulator)
{
Crypto::UnsignedBigInteger num1({});
Crypto::UnsignedBigInteger num1 {};
Crypto::UnsignedBigInteger num2(10);
Crypto::UnsignedBigIntegerAlgorithms::add_into_accumulator_without_allocation(num1, num2);
EXPECT_EQ(num1.words(), Vector<u32> { 10 });