The unified diff between revisions [90deb244..] and [b773b0a7..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'include/bigint.h'
#
#
# patch "include/bigint.h"
# from [689ece18a80002a375af09f33d855f33469aa0f6]
# to [fb6bdbaf9256d243c2a40b877fbb572986b76b77]
#
============================================================
--- include/bigint.h 689ece18a80002a375af09f33d855f33469aa0f6
+++ include/bigint.h fb6bdbaf9256d243c2a40b877fbb572986b76b77
@@ -1,6 +1,6 @@
/*************************************************
* BigInt Header File *
-* (C) 1999-2007 The Botan Project *
+* (C) 1999-2007 Jack Lloyd *
*************************************************/
#ifndef BOTAN_BIGINT_H__
@@ -15,7 +15,7 @@ namespace Botan {
/*************************************************
* BigInt *
*************************************************/
-class BigInt
+class BOTAN_DLL BigInt
{
public:
enum Base { Octal = 8, Decimal = 10, Hexadecimal = 16, Binary = 256 };
@@ -78,14 +78,15 @@ class BigInt
SecureVector<word>& get_reg() { return reg; }
void grow_reg(u32bit) const;
- word& operator[](u32bit index) { return reg[index]; }
- word operator[](u32bit index) const { return reg[index]; }
+ word& operator[](u32bit);
+ word operator[](u32bit) const;
void clear() { reg.clear(); }
void randomize(u32bit = 0);
void binary_encode(byte[]) const;
void binary_decode(const byte[], u32bit);
+ void binary_decode(const MemoryRegion<byte>&);
u32bit encoded_size(Base = Binary) const;
static SecureVector<byte> encode(const BigInt&, Base = Binary);
@@ -112,14 +113,14 @@ class BigInt
/*************************************************
* Arithmetic Operators *
*************************************************/
-BigInt operator+(const BigInt&, const BigInt&);
-BigInt operator-(const BigInt&, const BigInt&);
-BigInt operator*(const BigInt&, const BigInt&);
-BigInt operator/(const BigInt&, const BigInt&);
-BigInt operator%(const BigInt&, const BigInt&);
-word operator%(const BigInt&, word);
-BigInt operator<<(const BigInt&, u32bit);
-BigInt operator>>(const BigInt&, u32bit);
+BigInt BOTAN_DLL operator+(const BigInt&, const BigInt&);
+BigInt BOTAN_DLL operator-(const BigInt&, const BigInt&);
+BigInt BOTAN_DLL operator*(const BigInt&, const BigInt&);
+BigInt BOTAN_DLL operator/(const BigInt&, const BigInt&);
+BigInt BOTAN_DLL operator%(const BigInt&, const BigInt&);
+word BOTAN_DLL operator%(const BigInt&, word);
+BigInt BOTAN_DLL operator<<(const BigInt&, u32bit);
+BigInt BOTAN_DLL operator>>(const BigInt&, u32bit);
/*************************************************
* Comparison Operators *
@@ -140,8 +141,8 @@ inline bool operator>(const BigInt& a, c
/*************************************************
* I/O Operators *
*************************************************/
-std::ostream& operator<<(std::ostream&, const BigInt&);
-std::istream& operator>>(std::istream&, BigInt&);
+BOTAN_DLL std::ostream& operator<<(std::ostream&, const BigInt&);
+BOTAN_DLL std::istream& operator>>(std::istream&, BigInt&);
}