summaryrefslogtreecommitdiff
path: root/modarith.h
diff options
context:
space:
mode:
authorweidai <weidai11@users.noreply.github.com>2003-07-04 00:17:37 +0000
committerweidai <weidai11@users.noreply.github.com>2003-07-04 00:17:37 +0000
commitf278895908e663a6a5a2c1f63e5523c5004f5d20 (patch)
tree0536d87e504a82920156c239bc5ae6aa43e70ebc /modarith.h
parente43f74604744291d3a99b8bfe81d94af4ba6abbd (diff)
downloadcryptopp-git-f278895908e663a6a5a2c1f63e5523c5004f5d20.tar.gz
create DLL version, fix GetNextIV() bug in CTR and OFB modes
Diffstat (limited to 'modarith.h')
-rw-r--r--modarith.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/modarith.h b/modarith.h
index b97b1060..365f4c5e 100644
--- a/modarith.h
+++ b/modarith.h
@@ -10,8 +10,12 @@
NAMESPACE_BEGIN(CryptoPP)
+CRYPTOPP_DLL_TEMPLATE_CLASS AbstractGroup<Integer>;
+CRYPTOPP_DLL_TEMPLATE_CLASS AbstractRing<Integer>;
+CRYPTOPP_DLL_TEMPLATE_CLASS AbstractEuclideanDomain<Integer>;
+
//! .
-class ModularArithmetic : public AbstractRing<Integer>
+class CRYPTOPP_DLL ModularArithmetic : public AbstractRing<Integer>
{
public:
@@ -99,6 +103,9 @@ public:
return Element( rng , Integer( (long) 0) , modulus - Integer( (long) 1 ) ) ;
}
+ bool operator==(const ModularArithmetic &rhs) const
+ {return modulus == rhs.modulus;}
+
static const RandomizationParameter DefaultRandomizationParameter ;
protected:
@@ -110,7 +117,7 @@ protected:
// const ModularArithmetic::RandomizationParameter ModularArithmetic::DefaultRandomizationParameter = 0 ;
//! do modular arithmetics in Montgomery representation for increased speed
-class MontgomeryRepresentation : public ModularArithmetic
+class CRYPTOPP_DLL MontgomeryRepresentation : public ModularArithmetic
{
public:
MontgomeryRepresentation(const Integer &modulus); // modulus must be odd