summaryrefslogtreecommitdiff
path: root/modarith.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-07-04 00:17:37 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-07-04 00:17:37 +0000
commit572fe07633123ce38abf28c6426356e37aef3a99 (patch)
tree0536d87e504a82920156c239bc5ae6aa43e70ebc /modarith.h
parent3e8c979ddc194e043567c036321e67c89f847362 (diff)
downloadcryptopp-572fe07633123ce38abf28c6426356e37aef3a99.tar.gz
create DLL version, fix GetNextIV() bug in CTR and OFB modes
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@87 57ff6487-cd31-0410-9ec3-f628ee90f5f0
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 b97b106..365f4c5 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