aboutsummaryrefslogtreecommitdiffstats
path: root/src/math/gfpmath/gfp_element.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-12-16 02:52:12 +0000
committerlloyd <[email protected]>2009-12-16 02:52:12 +0000
commit317b76d71dca1840c9e72f9a26407590719c1423 (patch)
tree2eb49072e6e27f6ee41e704004aa8689b1e98bb3 /src/math/gfpmath/gfp_element.h
parent457ce43934a4e51ead4d21e43013eef9d448d0e1 (diff)
parent12afeca214c4414a0ced0bc4654d0fc5908dc77b (diff)
propagate from branch 'net.randombit.botan' (head 744dccf92270cf16b80b50ee2759424c9866b256)
to branch 'net.randombit.botan.c++0x' (head 2aa1acac1d05e8ea9991fe39015b1db9abc3b24e)
Diffstat (limited to 'src/math/gfpmath/gfp_element.h')
-rw-r--r--src/math/gfpmath/gfp_element.h40
1 files changed, 19 insertions, 21 deletions
diff --git a/src/math/gfpmath/gfp_element.h b/src/math/gfpmath/gfp_element.h
index d340c77b1..c84806f9a 100644
--- a/src/math/gfpmath/gfp_element.h
+++ b/src/math/gfpmath/gfp_element.h
@@ -218,14 +218,6 @@ class BOTAN_DLL GFpElement
//friend declarations for non-member functions
- /**
- * write a GFpElement to an output stream.
- * @param output the output stream to write to
- * @param elem the object to write
- * @result the output stream
- */
- friend std::ostream& operator<<(std::ostream& output, const GFpElement& elem);
-
friend class Point_Coords_GFp;
/**
@@ -252,31 +244,37 @@ class BOTAN_DLL GFpElement
};
// relational operators
-bool operator==(const GFpElement& lhs, const GFpElement& rhs);
+bool BOTAN_DLL operator==(const GFpElement& lhs, const GFpElement& rhs);
inline bool operator!=(const GFpElement& lhs, const GFpElement& rhs )
{
return !operator==(lhs, rhs);
}
// arithmetic operators
-GFpElement operator+(const GFpElement& lhs, const GFpElement& rhs);
-GFpElement operator-(const GFpElement& lhs, const GFpElement& rhs);
-GFpElement operator-(const GFpElement& lhs);
+GFpElement BOTAN_DLL operator+(const GFpElement& lhs, const GFpElement& rhs);
+GFpElement BOTAN_DLL operator-(const GFpElement& lhs, const GFpElement& rhs);
+GFpElement BOTAN_DLL operator-(const GFpElement& lhs);
-GFpElement operator*(const GFpElement& lhs, const GFpElement& rhs);
-GFpElement operator/(const GFpElement& lhs, const GFpElement& rhs);
-GFpElement operator* (const GFpElement& lhs, u32bit rhs);
-GFpElement operator* (u32bit rhs, const GFpElement& lhs);
+GFpElement BOTAN_DLL operator*(const GFpElement& lhs, const GFpElement& rhs);
+GFpElement BOTAN_DLL operator/(const GFpElement& lhs, const GFpElement& rhs);
+GFpElement BOTAN_DLL operator* (const GFpElement& lhs, u32bit rhs);
+GFpElement BOTAN_DLL operator* (u32bit rhs, const GFpElement& lhs);
-// io operators
-std::ostream& operator<<(std::ostream& output, const GFpElement& elem);
+
+/**
+* write a GFpElement to an output stream.
+* @param output the output stream to write to
+* @param elem the object to write
+* @result the output stream
+*/
+BOTAN_DLL std::ostream& operator<<(std::ostream& output, const GFpElement& elem);
// return (*this)^(-1)
-GFpElement inverse(const GFpElement& elem);
+GFpElement BOTAN_DLL inverse(const GFpElement& elem);
// encoding and decoding
-SecureVector<byte> FE2OSP(const GFpElement& elem);
-GFpElement OS2FEP(MemoryRegion<byte> const& os, BigInt p);
+SecureVector<byte> BOTAN_DLL FE2OSP(const GFpElement& elem);
+GFpElement BOTAN_DLL OS2FEP(MemoryRegion<byte> const& os, BigInt p);
inline void swap(GFpElement& x, GFpElement& y)
{