oprava #define direktiv

This commit is contained in:
2024-10-03 11:44:03 +02:00
parent a4e66ddaaf
commit 4dcd40aadf
64 changed files with 268 additions and 114 deletions

View File

@@ -1,7 +1,5 @@
#ifndef EZ_APPLICATION_LICENCE_DISABLE
#include "licReaderELC3.h"
// #define SHOW 1
#ifndef EZ_APPLICATION_LICENCE_DISABLE
namespace Reader
{
@@ -35,7 +33,7 @@ namespace Reader
throw LicenceException((int)GeneralError::FileOpenError, "Chyba otevření souboru licence: " + licFilePath);
}
#ifdef SHOW
#ifdef EZ_LIC_DEBUG_SHOW_DETAILS
cout << "Celý vstup zašifrovaný: \n";
for (const auto &x : content)
cout << (int)x << "-";
@@ -65,12 +63,12 @@ namespace Reader
vector<unsigned char> publicPart(content.begin(), content.begin() + 12 + this->licBody.licenceIdentHeader.publicHeaderLength);
#ifdef CRCCHECK
#ifdef EZ_LIC_DEBUG_SHOW_DETAILS
cout << "CRC read public size: " << publicPart.size() << "\n";
cout << "CRC read public: " << calculateCRC16(publicPart) << "\n";
#endif
#ifdef SHOW
#ifdef EZ_LIC_DEBUG_SHOW_DETAILS
cout << "\n public header length: " << licBody.licenceIdentHeader.publicHeaderLength << "\n";
#endif
@@ -88,7 +86,7 @@ namespace Reader
#ifdef SHOW
#ifdef EZ_LIC_DEBUG_SHOW_DETAILS
cout << "private encryptedsize: " << encryptedPart.size() << "\n";
cout << "private decryptedsize: " << privateContentDecrypted.size() << "\n";
cout << "private decrypted: \n";
@@ -97,7 +95,7 @@ namespace Reader
cout << "\n";
#endif
#ifdef CRCCHECK
#ifdef EZ_LIC_DEBUG_SHOW_DETAILS
cout << "CRC read private size: " << privateContentDecrypted.size() << "\n";
cout << "CRC read private: " << calculateCRC16(privateContentDecrypted) << "\n";
#endif
@@ -115,7 +113,7 @@ namespace Reader
throw LicenceException((int)GeneralError::ItemsCountMismatch, "Nesouhlasí počet položek licence.");
}
#ifdef SHOW
#ifdef EZ_LIC_DEBUG_SHOW_DETAILS
cout << "velikost: " << sizeof(licBodyDecrypted.licenceIdentHeader) << "\n";
#endif
@@ -136,7 +134,7 @@ namespace Reader
uint16_t crcCalculated = calculateCRC16(completeVector, 2);
#ifdef SHOW
#ifdef EZ_LIC_DEBUG_SHOW_DETAILS
// cout << "content: \n";
// for (const auto x : content) cout << (int)x << "-";