Update documentation

pull/574/head
Jeffrey Walton 2018-01-23 16:08:46 -05:00
parent 4c1b303c29
commit 8175f069cd
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 14 additions and 2 deletions

8
ec2n.h
View File

@ -114,8 +114,14 @@ public:
Element BERDecodeElement(BufferedTransformation &bt) const {return m_ec.BERDecodePoint(bt);}
void DEREncodeElement(BufferedTransformation &bt, const Element &v) const {m_ec.DEREncodePoint(bt, v, false);}
// non-inherited
/// \brief Set the elliptic curve
/// \param ec ECP derived class
/// \details SetCurve() is not inherited
void SetCurve(const EC2N &ec) {m_ec = ec;}
/// \brief Get the elliptic curve
/// \returns EC2N curve
/// \details GetCurve() is not inherited
const EC2N & GetCurve() const {return m_ec;}
private:

8
ecp.h
View File

@ -128,12 +128,18 @@ public:
Element BERDecodeElement(BufferedTransformation &bt) const {return m_ec->BERDecodePoint(bt);}
void DEREncodeElement(BufferedTransformation &bt, const Element &v) const {m_ec->DEREncodePoint(bt, v, false);}
// non-inherited
/// \brief Set the elliptic curve
/// \param ec ECP derived class
/// \details SetCurve() is not inherited
void SetCurve(const ECP &ec)
{
m_ec.reset(new ECP(ec, true));
m_ecOriginal = ec;
}
/// \brief Get the elliptic curve
/// \returns ECP curve
/// \details GetCurve() is not inherited
const ECP & GetCurve() const {return *m_ecOriginal;}
private: