aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math/bigint/bigint.h
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-07-22 00:15:55 +0200
committerSimon Warta <[email protected]>2015-07-24 10:33:40 +0200
commite5e8635ab5e21991e890b229c9c563ffeec2db31 (patch)
tree3f8e34c177b46ac95706958f9d84dfa8cdcd1783 /src/lib/math/bigint/bigint.h
parent10883bb5b8fb2804b9af08c7cfe9f869be811d0b (diff)
Refactor BigInt
Diffstat (limited to 'src/lib/math/bigint/bigint.h')
-rw-r--r--src/lib/math/bigint/bigint.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/lib/math/bigint/bigint.h b/src/lib/math/bigint/bigint.h
index 4a37425f5..d866698b3 100644
--- a/src/lib/math/bigint/bigint.h
+++ b/src/lib/math/bigint/bigint.h
@@ -42,7 +42,7 @@ class BOTAN_DLL BigInt
/**
* Create empty BigInt
*/
- BigInt() { m_signedness = Positive; }
+ BigInt() {}
/**
* Create BigInt from 64 bit integer
@@ -400,7 +400,7 @@ class BOTAN_DLL BigInt
* Give byte length of the integer
* @result byte length of the represented integer value
*/
- size_t bytes() const { return (bits() + 7) / 8; }
+ size_t bytes() const;
/**
* Get the bit length of the integer
@@ -427,11 +427,7 @@ class BOTAN_DLL BigInt
* Increase internal register buffer to at least n words
* @param n new size of register
*/
- void grow_to(size_t n)
- {
- if(n > size())
- m_reg.resize(n + (8 - n % 8));
- }
+ void grow_to(size_t n);
/**
* Fill BigInt with a random number with size of bitsize