EgtLock 1.6g8 :

- aggiunta gestione chiavi hardware OxySec
- spostati Base64 e Crc32 in General.
This commit is contained in:
Dario Sassi
2015-07-29 07:03:48 +00:00
parent 23b8eba120
commit 07e9914302
14 changed files with 341 additions and 401 deletions
+10 -9
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2014-2014
// EgalTech 2014-2015
//----------------------------------------------------------------------------
// File : KeyProc.cpp Data : 10.09.14 Versione : 1.5i2
// File : KeyProc.cpp Data : 27.07.15 Versione : 1.6g1
// Contenuto : Funzioni per la gestione della chiave.
//
//
@@ -15,17 +15,18 @@
//------------------ Include -------------------------------------------------
#include "stdafx.h"
#include <time.h>
#include "LockId.h"
#include "Obfuscate.h"
#include "/EgtDev/Include/EGnStringUtils.h"
#include "/EgtDev/Include/EgtBase64.h"
#include "/EgtDev/Include/EgtCrc32.h"
#include "/EgtDev/Include/SELkKeyProc.h"
#include "/EgtDev/Include/SELkMachineId.h"
#include "/EgtDev/Include/SELkCrc32.h"
#include "/EgtDev/Include/SELkBase64.h"
#include "/EgtDev/Include/SELkLockId.h"
using namespace std ;
//----------------------------------------------------------------------------
static const int MIN_DAYS = 16326 ; // giorni al 13/09/2014 dal 1/1/1970
static const int MIN_DAYS = 16642 ; // giorni al 27/07/2015 dal 1/1/1970
static const int N_STEP = 7 ;
//----------------------------------------------------------------------------
@@ -111,11 +112,11 @@ VerifyKey( const string& sKey, int nProd, int nVer, int nLev,
unsigned int& nKOpt1, unsigned int& nKOpt2, int& nKOptExpDays)
{
// creo la chiave di scramble
string sMachId2 ;
if ( ! GetMachineId2( sMachId2))
string sLockId2 ;
if ( ! GetLockId2( sLockId2))
return KEY_ERR_MACHID ;
string sScramKey ;
if ( ! ConvertMachineId2ToScramKey( sMachId2, sScramKey))
if ( ! ConvertLockId2ToScramKey( sLockId2, sScramKey))
return KEY_ERR_SCRAMKEY ;
// recupero le informazioni nella chiave
if ( ! ReadKey( sKey, sScramKey,