Skip to content

Commit

Permalink
fix: add missing destructor for CoreMPL and final for nested classes (#…
Browse files Browse the repository at this point in the history
…371)

Signing commit from @knst from #359

Co-authored-by: Konstantin Akimov <545784+knst@users.noreply.github.com>
  • Loading branch information
wallentx and knst committed May 9, 2023
1 parent 9ad31ee commit 956d310
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/schemes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class CoreMPL {
public:
CoreMPL() = delete;
CoreMPL(const std::string& strId) : strCiphersuiteId(strId) {}
virtual ~CoreMPL() {}
// Generates a private key from a seed, similar to HD key generation
// (hashes the seed), and reduces it mod the group order
virtual PrivateKey KeyGen(const vector<uint8_t>& seed);
Expand Down Expand Up @@ -96,7 +97,7 @@ class CoreMPL {
bool NativeVerify(g1_t *pubKeys, g2_t *mappedHashes, size_t length);
};

class BasicSchemeMPL : public CoreMPL {
class BasicSchemeMPL final : public CoreMPL {
public:
static const std::string CIPHERSUITE_ID;
BasicSchemeMPL() : CoreMPL(BasicSchemeMPL::CIPHERSUITE_ID) {}
Expand All @@ -117,7 +118,7 @@ class BasicSchemeMPL : public CoreMPL {
const G2Element& signature) override;
};

class AugSchemeMPL : public CoreMPL {
class AugSchemeMPL final : public CoreMPL {

public:
static const std::string CIPHERSUITE_ID;
Expand Down Expand Up @@ -170,7 +171,7 @@ class AugSchemeMPL : public CoreMPL {
const G2Element& signature) override;
};

class PopSchemeMPL : public CoreMPL {
class PopSchemeMPL final : public CoreMPL {

public:
static const std::string CIPHERSUITE_ID;
Expand Down

0 comments on commit 956d310

Please sign in to comment.