Cleared virtual destructor warning by explicitly adding them
parent
b435ce07c8
commit
ca6a93bbc5
2
ec2n.h
2
ec2n.h
|
|
@ -100,6 +100,8 @@ public:
|
||||||
Element BERDecodeElement(BufferedTransformation &bt) const {return m_ec.BERDecodePoint(bt);}
|
Element BERDecodeElement(BufferedTransformation &bt) const {return m_ec.BERDecodePoint(bt);}
|
||||||
void DEREncodeElement(BufferedTransformation &bt, const Element &v) const {m_ec.DEREncodePoint(bt, v, false);}
|
void DEREncodeElement(BufferedTransformation &bt, const Element &v) const {m_ec.DEREncodePoint(bt, v, false);}
|
||||||
|
|
||||||
|
virtual ~EcPrecomputation() { }
|
||||||
|
|
||||||
// non-inherited
|
// non-inherited
|
||||||
void SetCurve(const EC2N &ec) {m_ec = ec;}
|
void SetCurve(const EC2N &ec) {m_ec = ec;}
|
||||||
const EC2N & GetCurve() const {return m_ec;}
|
const EC2N & GetCurve() const {return m_ec;}
|
||||||
|
|
|
||||||
2
ecp.h
2
ecp.h
|
|
@ -109,6 +109,8 @@ public:
|
||||||
Element BERDecodeElement(BufferedTransformation &bt) const {return m_ec->BERDecodePoint(bt);}
|
Element BERDecodeElement(BufferedTransformation &bt) const {return m_ec->BERDecodePoint(bt);}
|
||||||
void DEREncodeElement(BufferedTransformation &bt, const Element &v) const {m_ec->DEREncodePoint(bt, v, false);}
|
void DEREncodeElement(BufferedTransformation &bt, const Element &v) const {m_ec->DEREncodePoint(bt, v, false);}
|
||||||
|
|
||||||
|
virtual ~EcPrecomputation() { }
|
||||||
|
|
||||||
// non-inherited
|
// non-inherited
|
||||||
void SetCurve(const ECP &ec)
|
void SetCurve(const ECP &ec)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ public:
|
||||||
typedef T Element;
|
typedef T Element;
|
||||||
|
|
||||||
DL_FixedBasePrecomputationImpl() : m_windowSize(0) {}
|
DL_FixedBasePrecomputationImpl() : m_windowSize(0) {}
|
||||||
|
virtual ~DL_FixedBasePrecomputationImpl() { }
|
||||||
|
|
||||||
// DL_FixedBasePrecomputation
|
// DL_FixedBasePrecomputation
|
||||||
bool IsInitialized() const
|
bool IsInitialized() const
|
||||||
|
|
|
||||||
2
luc.cpp
2
luc.cpp
|
|
@ -97,6 +97,8 @@ class LUCPrimeSelector : public PrimeSelector
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LUCPrimeSelector(const Integer &e) : m_e(e) {}
|
LUCPrimeSelector(const Integer &e) : m_e(e) {}
|
||||||
|
virtual ~LUCPrimeSelector() { }
|
||||||
|
|
||||||
bool IsAcceptable(const Integer &candidate) const
|
bool IsAcceptable(const Integer &candidate) const
|
||||||
{
|
{
|
||||||
return RelativelyPrime(m_e, candidate+1) && RelativelyPrime(m_e, candidate-1);
|
return RelativelyPrime(m_e, candidate+1) && RelativelyPrime(m_e, candidate-1);
|
||||||
|
|
|
||||||
6
luc.h
6
luc.h
|
|
@ -119,6 +119,8 @@ public:
|
||||||
Element BERDecodeElement(BufferedTransformation &bt) const {return Integer(bt);}
|
Element BERDecodeElement(BufferedTransformation &bt) const {return Integer(bt);}
|
||||||
void DEREncodeElement(BufferedTransformation &bt, const Element &v) const {v.DEREncode(bt);}
|
void DEREncodeElement(BufferedTransformation &bt, const Element &v) const {v.DEREncode(bt);}
|
||||||
|
|
||||||
|
virtual ~DL_GroupPrecomputation_LUC() { }
|
||||||
|
|
||||||
// non-inherited
|
// non-inherited
|
||||||
void SetModulus(const Integer &v) {m_p = v;}
|
void SetModulus(const Integer &v) {m_p = v;}
|
||||||
const Integer & GetModulus() const {return m_p;}
|
const Integer & GetModulus() const {return m_p;}
|
||||||
|
|
@ -142,6 +144,8 @@ public:
|
||||||
Integer CascadeExponentiate(const DL_GroupPrecomputation<Element> &group, const Integer &exponent, const DL_FixedBasePrecomputation<Integer> &pc2, const Integer &exponent2) const
|
Integer CascadeExponentiate(const DL_GroupPrecomputation<Element> &group, const Integer &exponent, const DL_FixedBasePrecomputation<Integer> &pc2, const Integer &exponent2) const
|
||||||
{throw NotImplemented("DL_BasePrecomputation_LUC: CascadeExponentiate not implemented");} // shouldn't be called
|
{throw NotImplemented("DL_BasePrecomputation_LUC: CascadeExponentiate not implemented");} // shouldn't be called
|
||||||
|
|
||||||
|
virtual ~DL_BasePrecomputation_LUC() { }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Integer m_g;
|
Integer m_g;
|
||||||
};
|
};
|
||||||
|
|
@ -158,6 +162,8 @@ public:
|
||||||
Element CascadeExponentiate(const Element &element1, const Integer &exponent1, const Element &element2, const Integer &exponent2) const
|
Element CascadeExponentiate(const Element &element1, const Integer &exponent1, const Element &element2, const Integer &exponent2) const
|
||||||
{throw NotImplemented("LUC_GroupParameters: MultiplyElements can not be implemented");}
|
{throw NotImplemented("LUC_GroupParameters: MultiplyElements can not be implemented");}
|
||||||
|
|
||||||
|
virtual ~DL_GroupParameters_LUC() { }
|
||||||
|
|
||||||
// NameValuePairs interface
|
// NameValuePairs interface
|
||||||
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const
|
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,8 @@ public:
|
||||||
Element BERDecodeElement(BufferedTransformation &bt) const {return Integer(bt);}
|
Element BERDecodeElement(BufferedTransformation &bt) const {return Integer(bt);}
|
||||||
void DEREncodeElement(BufferedTransformation &bt, const Element &v) const {v.DEREncode(bt);}
|
void DEREncodeElement(BufferedTransformation &bt, const Element &v) const {v.DEREncode(bt);}
|
||||||
|
|
||||||
|
virtual ~ModExpPrecomputation() { }
|
||||||
|
|
||||||
// non-inherited
|
// non-inherited
|
||||||
void SetModulus(const Integer &v) {m_mr.reset(new MontgomeryRepresentation(v));}
|
void SetModulus(const Integer &v) {m_mr.reset(new MontgomeryRepresentation(v));}
|
||||||
const Integer & GetModulus() const {return m_mr->GetModulus();}
|
const Integer & GetModulus() const {return m_mr->GetModulus();}
|
||||||
|
|
|
||||||
2
rsa.cpp
2
rsa.cpp
|
|
@ -97,6 +97,8 @@ class RSAPrimeSelector : public PrimeSelector
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RSAPrimeSelector(const Integer &e) : m_e(e) {}
|
RSAPrimeSelector(const Integer &e) : m_e(e) {}
|
||||||
|
virtual ~RSAPrimeSelector() { }
|
||||||
|
|
||||||
bool IsAcceptable(const Integer &candidate) const {return RelativelyPrime(m_e, candidate-Integer::One());}
|
bool IsAcceptable(const Integer &candidate) const {return RelativelyPrime(m_e, candidate-Integer::One());}
|
||||||
Integer m_e;
|
Integer m_e;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue