36 lines
926 B
C++
36 lines
926 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
class Licensed {
|
|
public:
|
|
Licensed();
|
|
~Licensed();
|
|
|
|
static Licensed& Instance();
|
|
|
|
const std::string GetKey(void) const;
|
|
bool Valid(const std::string& str) const;
|
|
std::string Generated(const std::string& key) const;
|
|
bool GeneratedKeyToFile(const std::string& key, const std::string& path);
|
|
bool CheckKeyFromFile(const std::string& path);
|
|
|
|
bool CheckValid();
|
|
void UpdateToken();
|
|
|
|
void UpdateGetTokenCount(bool success);
|
|
|
|
private:
|
|
void GetCpuId(unsigned int CPUInfo[4], unsigned int InfoType) const;
|
|
void GetCpuIdex(unsigned int CPUInfo[4], unsigned int InfoType, unsigned int ECXValue) const;
|
|
char* GetCpuId(char* pCpuId, int rom) const;
|
|
std::string GetHardDiskID() const;
|
|
std::string AddString(const std::string& a, const std::string& b) const;
|
|
|
|
std::string GetKeyFromLocalFile() const;
|
|
|
|
private:
|
|
int32_t m_count{ 0 };
|
|
};
|
|
|