upravy opravy
This commit is contained in:
@@ -29,22 +29,21 @@ public:
|
||||
// struct __attribute__((__packed__)) LicencePublicHeader
|
||||
struct LicenceIdentDataHeader
|
||||
{
|
||||
BYTE licenceType = 0; // EOSEOV, DRT ...
|
||||
BYTE licenceType {}; // EOSEOV, DRT ...
|
||||
BYTE licenceTypeVersion = 1; // verze licence, urcuje nuance sifrování a pojmenování souborů
|
||||
BYTE licenceIndex = 0; // puvodní post fix, identifikátor pro více licencí
|
||||
BYTE licenceIndex {}; // puvodní post fix, identifikátor pro více licencí
|
||||
BYTE compatibilityVersion = 1; // udava verzi komplet PrivateContent
|
||||
BYTE licItemCount = 0; // počet licenčních bodů
|
||||
WORD publicHeaderLength = 0; // délka veřejné hlavičy
|
||||
WORD cardSize = 0; // velikost SD karty
|
||||
DWORD serialNumber = 0; // seriove cislo karty
|
||||
BYTE licItemCount {}; // počet protokolů v linenci
|
||||
WORD publicHeaderLength {}; // délka veřejné hlavičy
|
||||
WORD cardSize {}; // velikost SD karty
|
||||
DWORD serialNumber = {}; // seriove cislo karty
|
||||
};
|
||||
|
||||
///
|
||||
struct licDataItem
|
||||
{
|
||||
WORD protoId = 0; // id protokolu pro ktery je licence
|
||||
WORD licCount = 0; // pocet datovych bodu licence
|
||||
char dummy[64] = {}; // dummy pro větší velikost licence v případě méně licenčních bodů
|
||||
DWORD protoId {}; // id protokolu pro ktery je licence
|
||||
DWORD licCount {}; // pocet datovych bodu licence
|
||||
};
|
||||
|
||||
struct PublicHeader
|
||||
@@ -57,22 +56,22 @@ public:
|
||||
|
||||
struct PrivateContent // privátní šifrovaná část
|
||||
{
|
||||
LicenceIdentDataHeader licenceIdentHeader;
|
||||
vector<licDataItem> dataItems;
|
||||
WORD crc = 0;
|
||||
LicenceIdentDataHeader licenceIdentHeader {};
|
||||
vector<licDataItem> dataItems {};
|
||||
WORD crc {};
|
||||
};
|
||||
|
||||
struct LicenceBody
|
||||
{
|
||||
LicenceId licId;
|
||||
LicenceIdentDataHeader licenceIdentHeader;
|
||||
LicenceId licId {};
|
||||
LicenceIdentDataHeader licenceIdentHeader {};
|
||||
string publicHeader = ""; // JSON
|
||||
PrivateContent privateContent;
|
||||
PrivateContent privateContent {};
|
||||
};
|
||||
|
||||
LicenceBody licBody;
|
||||
SDCard sdCard;
|
||||
LicenceIdentification lIdentification;
|
||||
LicenceBody licBody {};
|
||||
SDCard sdCard {};
|
||||
LicenceIdentification lIdentification {};
|
||||
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)[]);
|
||||
|
||||
Reference in New Issue
Block a user