| | |
| | | |
| | | #include <memory> |
| | | #include <cstddef> |
| | | #include <string> |
| | | |
| | | namespace license { |
| | | using namespace std; |
| | |
| | | class CryptoHelper { |
| | | |
| | | protected: |
| | | CryptoHelper(); |
| | | inline CryptoHelper(){}; |
| | | |
| | | public: |
| | | virtual void generateKeyPair() = 0; |
| | | virtual const string exportPrivateKey() const = 0; |
| | | virtual const string exportPublicKey() const = 0; |
| | | |
| | | virtual const string signString(const unsigned char* privateKey, |
| | | virtual const string signString(const void* privateKey, |
| | | size_t pklen, const string& license) const = 0; |
| | | static unique_ptr<CryptoHelper> getInstance(); |
| | | virtual ~CryptoHelper(); |
| | | inline virtual ~CryptoHelper(){}; |
| | | }; |
| | | } |
| | | #endif |