From 67b24cb3a68c528c530887059955d0d706a8aa63 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Sat, 15 Aug 2020 22:53:28 +0200 Subject: [PATCH] LibCrypto: Document word order (endianness) of bigint --- Libraries/LibCrypto/BigInt/UnsignedBigInteger.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h b/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h index 752343f4fb..86789422f8 100644 --- a/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h +++ b/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h @@ -114,6 +114,8 @@ private: ALWAYS_INLINE static u32 shift_left_get_one_word(const UnsignedBigInteger& number, size_t num_bits, size_t result_word_index); static constexpr size_t BITS_IN_WORD = 32; + // Little endian + // m_word[0] + m_word[1] * 256 + m_word[2] * 65536 + ... AK::Vector m_words; // Used to indicate a negative result, or a result of an invalid operation