| 12345678910111213141516171819202122232425 |
- #pragma once
- #include <string>
- namespace reginfo {
- struct LicenseInfo {
- std::string name;
- std::string machineCode;
- std::string phone;
- std::string unit;
- std::string authDateTime; // 授权日期
- std::string overDateTime; // 过期时间
- std::string updateDateTime; // 升级到期时间
- };
- // Generate an encrypted license file.
- // Returns true on success, false on failure.
- bool generateLicenseFile(const LicenseInfo& info, const std::string& filePath);
- // Read and decrypt a license file.
- // Returns the license info on success, throws std::runtime_error on failure.
- LicenseInfo readLicenseFile(const std::string& filePath);
- } // namespace reginfo
|