aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math/bigint
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/math/bigint')
-rw-r--r--src/lib/math/bigint/bigint.cpp7
-rw-r--r--src/lib/math/bigint/bigint.h7
-rw-r--r--src/lib/math/bigint/divide.h2
3 files changed, 10 insertions, 6 deletions
diff --git a/src/lib/math/bigint/bigint.cpp b/src/lib/math/bigint/bigint.cpp
index 6f5f1f473..bdb0f4214 100644
--- a/src/lib/math/bigint/bigint.cpp
+++ b/src/lib/math/bigint/bigint.cpp
@@ -10,6 +10,7 @@
#include <botan/internal/rounding.h>
#include <botan/internal/bit_ops.h>
#include <botan/internal/ct_utils.h>
+#include <botan/loadstor.h>
namespace Botan {
@@ -106,6 +107,12 @@ BigInt::BigInt(RandomNumberGenerator& rng, size_t bits, bool set_high_bit)
randomize(rng, bits, set_high_bit);
}
+uint8_t BigInt::byte_at(size_t n) const
+ {
+ return get_byte(sizeof(word) - (n % sizeof(word)) - 1,
+ word_at(n / sizeof(word)));
+ }
+
int32_t BigInt::cmp_word(word other) const
{
if(is_negative())
diff --git a/src/lib/math/bigint/bigint.h b/src/lib/math/bigint/bigint.h
index 505bacde0..ac0a57038 100644
--- a/src/lib/math/bigint/bigint.h
+++ b/src/lib/math/bigint/bigint.h
@@ -12,7 +12,6 @@
#include <botan/types.h>
#include <botan/secmem.h>
#include <botan/exceptn.h>
-#include <botan/loadstor.h>
#include <iosfwd>
namespace Botan {
@@ -497,11 +496,7 @@ class BOTAN_PUBLIC_API(2,0) BigInt final
* @param n the offset to get a byte from
* @result byte at offset n
*/
- uint8_t byte_at(size_t n) const
- {
- return get_byte(sizeof(word) - (n % sizeof(word)) - 1,
- word_at(n / sizeof(word)));
- }
+ uint8_t byte_at(size_t n) const;
/**
* Return the word at a specified position of the internal register
diff --git a/src/lib/math/bigint/divide.h b/src/lib/math/bigint/divide.h
index e365dabb3..deb6ffdbb 100644
--- a/src/lib/math/bigint/divide.h
+++ b/src/lib/math/bigint/divide.h
@@ -10,6 +10,8 @@
#include <botan/bigint.h>
+BOTAN_FUTURE_INTERNAL_HEADER(divide.h)
+
namespace Botan {
/**