summaryrefslogtreecommitdiff
path: root/modexppc.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2015-11-05 01:59:46 -0500
committerJeffrey Walton <noloader@gmail.com>2015-11-05 01:59:46 -0500
commit48809d4e85c125814425c621d8d0d89f95405924 (patch)
tree1010fd16c4b1199f3d27dd726dda241a2bd29f83 /modexppc.h
parent025337a94aceb75d188149db70c2094673772816 (diff)
downloadcryptopp-git-48809d4e85c125814425c621d8d0d89f95405924.tar.gz
CRYPTOPP 5.6.3 RC6 checkin
Diffstat (limited to 'modexppc.h')
-rw-r--r--modexppc.h74
1 files changed, 36 insertions, 38 deletions
diff --git a/modexppc.h b/modexppc.h
index 615aa110..ebfcf6f0 100644
--- a/modexppc.h
+++ b/modexppc.h
@@ -1,38 +1,36 @@
-#ifndef CRYPTOPP_MODEXPPC_H
-#define CRYPTOPP_MODEXPPC_H
-
-#include "cryptlib.h"
-#include "integer.h"
-#include "modarith.h"
-#include "eprecomp.h"
-#include "smartptr.h"
-#include "pubkey.h"
-
-NAMESPACE_BEGIN(CryptoPP)
-
-CRYPTOPP_DLL_TEMPLATE_CLASS DL_FixedBasePrecomputationImpl<Integer>;
-
-class ModExpPrecomputation : public DL_GroupPrecomputation<Integer>
-{
-public:
- // DL_GroupPrecomputation
- bool NeedConversions() const {return true;}
- Element ConvertIn(const Element &v) const {return m_mr->ConvertIn(v);}
- virtual Element ConvertOut(const Element &v) const {return m_mr->ConvertOut(v);}
- const AbstractGroup<Element> & GetGroup() const {return m_mr->MultiplicativeGroup();}
- Element BERDecodeElement(BufferedTransformation &bt) const {return Integer(bt);}
- void DEREncodeElement(BufferedTransformation &bt, const Element &v) const {v.DEREncode(bt);}
-
- virtual ~ModExpPrecomputation() { }
-
- // non-inherited
- void SetModulus(const Integer &v) {m_mr.reset(new MontgomeryRepresentation(v));}
- const Integer & GetModulus() const {return m_mr->GetModulus();}
-
-private:
- value_ptr<MontgomeryRepresentation> m_mr;
-};
-
-NAMESPACE_END
-
-#endif
+#ifndef CRYPTOPP_MODEXPPC_H
+#define CRYPTOPP_MODEXPPC_H
+
+#include "cryptlib.h"
+#include "modarith.h"
+#include "integer.h"
+#include "eprecomp.h"
+#include "smartptr.h"
+#include "pubkey.h"
+
+NAMESPACE_BEGIN(CryptoPP)
+
+CRYPTOPP_DLL_TEMPLATE_CLASS DL_FixedBasePrecomputationImpl<Integer>;
+
+class ModExpPrecomputation : public DL_GroupPrecomputation<Integer>
+{
+public:
+ // DL_GroupPrecomputation
+ bool NeedConversions() const {return true;}
+ Element ConvertIn(const Element &v) const {return m_mr->ConvertIn(v);}
+ virtual Element ConvertOut(const Element &v) const {return m_mr->ConvertOut(v);}
+ const AbstractGroup<Element> & GetGroup() const {return m_mr->MultiplicativeGroup();}
+ Element BERDecodeElement(BufferedTransformation &bt) const {return Integer(bt);}
+ void DEREncodeElement(BufferedTransformation &bt, const Element &v) const {v.DEREncode(bt);}
+
+ // non-inherited
+ void SetModulus(const Integer &v) {m_mr.reset(new MontgomeryRepresentation(v));}
+ const Integer & GetModulus() const {return m_mr->GetModulus();}
+
+private:
+ value_ptr<MontgomeryRepresentation> m_mr;
+};
+
+NAMESPACE_END
+
+#endif