Oddělení ELC1 generatoru a readeru

This commit is contained in:
2024-01-31 14:19:23 +01:00
parent a7fc519138
commit c0b36e9068
35 changed files with 1528 additions and 81 deletions

View File

@@ -15,32 +15,31 @@ public:
LicenceELC2(LicenceIdentification &licIdentification);
~LicenceELC2();
string getLicenceName();
string cid_cdsPath = "";
string licenceFilePath = "";
Mapping mapping;
ErrorMessage errorMessage;
enum class Error
{
SDCardReadError = 50,
LicenceReadError = 51,
LicenceSizeMismatch = 52,
LicenceSizeCardMismatch = 53,
LicenceMismatch = 54,
ItemsCountMismatch = 61
};
// enum class Error
// {
// SDCardReadError = 50,
// LicenceReadError = 51,
// LicenceSizeMismatch = 52,
// LicenceSizeCardMismatch = 53,
// LicenceMismatch = 54,
// ItemsCountMismatch = 61
// };
unordered_map<Error, string> mapErrors = {
{Error::SDCardReadError, "Nepodařilo se načíst SD kartu."},
{Error::ItemsCountMismatch, "Nesouhlasí počet položek licence."},
{Error::LicenceSizeMismatch, "Nesouhlasí velikost souboru licence."},
{Error::LicenceSizeCardMismatch, "Nesouhlasí velikost SD karty."},
{Error::LicenceMismatch, "Nesouhlasí licence."},
{Error::ItemsCountMismatch, "Nesouhlasí počet položek licence."},
};
// unordered_map<Error, string> mapErrors = {
// {Error::SDCardReadError, "Nepodařilo se načíst SD kartu."},
// {Error::ItemsCountMismatch, "Nesouhlasí počet položek licence."},
// {Error::LicenceSizeMismatch, "Nesouhlasí velikost souboru licence."},
// {Error::LicenceSizeCardMismatch, "Nesouhlasí velikost SD karty."},
// {Error::LicenceMismatch, "Nesouhlasí licence."},
// {Error::ItemsCountMismatch, "Nesouhlasí počet položek licence."},
// };
struct LicenceId
{
@@ -98,6 +97,7 @@ public:
vector<unsigned char> cryptPrivateContent(const std::vector<unsigned char> &content);
vector<unsigned char> decryptPrivateContent(const std::vector<unsigned char> &content);
void initVector(BYTE (&iVector)[], BYTE (&key)[]);
string getLicenceName();
private: