From 4c1b303c2925ad1a3c69b8f2b0869e513035f9ba Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Tue, 23 Jan 2018 15:54:06 -0500 Subject: Update documentation --- eprecomp.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'eprecomp.h') diff --git a/eprecomp.h b/eprecomp.h index 210f678c..f9e677ff 100644 --- a/eprecomp.h +++ b/eprecomp.h @@ -13,6 +13,8 @@ NAMESPACE_BEGIN(CryptoPP) +/// \brief DL_GroupPrecomputation interface +/// \tparam T Field element template class DL_GroupPrecomputation { @@ -21,14 +23,39 @@ public: virtual ~DL_GroupPrecomputation() {} + /// \brief Determines if elements needs conversion + /// \returns true if the element needs conversion, false otherwise + /// \details NeedConversions determines if an element must convert between representations. virtual bool NeedConversions() const {return false;} + + /// \brief Converts an element between representations + /// \param v element to convert + /// \returns an element converted to an alternate representation for internal use + /// \details ConvertIn is used when an element must convert between representations. virtual Element ConvertIn(const Element &v) const {return v;} + + /// \brief Converts an element between representations + /// \param v element to convert + /// \returns an element converted from an alternate representation virtual Element ConvertOut(const Element &v) const {return v;} + + /// \brief Retrieves AbstractGroup interface + /// \returns GetGroup() returns the AbstractGroup interface virtual const AbstractGroup & GetGroup() const =0; + + /// \brief Decodes element in DER format + /// \param bt BufferedTransformation object + /// \param P Element to decode virtual Element BERDecodeElement(BufferedTransformation &bt) const =0; + + /// \brief Encodes element in DER format + /// \param bt BufferedTransformation object + /// \param P Element to encode virtual void DEREncodeElement(BufferedTransformation &bt, const Element &P) const =0; }; +/// \brief DL_FixedBasePrecomputation interface +/// \tparam T Field element template class DL_FixedBasePrecomputation { @@ -47,6 +74,8 @@ public: virtual Element CascadeExponentiate(const DL_GroupPrecomputation &group, const Integer &exponent, const DL_FixedBasePrecomputation &pc2, const Integer &exponent2) const =0; }; +/// \brief DL_FixedBasePrecomputation adapter class +/// \tparam T Field element template class DL_FixedBasePrecomputationImpl : public DL_FixedBasePrecomputation { -- cgit v1.2.1