diff options
author | weidai <weidai11@users.noreply.github.com> | 2003-07-04 00:17:37 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2003-07-04 00:17:37 +0000 |
commit | f278895908e663a6a5a2c1f63e5523c5004f5d20 (patch) | |
tree | 0536d87e504a82920156c239bc5ae6aa43e70ebc /modarith.h | |
parent | e43f74604744291d3a99b8bfe81d94af4ba6abbd (diff) | |
download | cryptopp-git-f278895908e663a6a5a2c1f63e5523c5004f5d20.tar.gz |
create DLL version, fix GetNextIV() bug in CTR and OFB modes
Diffstat (limited to 'modarith.h')
-rw-r--r-- | modarith.h | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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 |