EgtLock 1.6n9 :

- controllo prodotto fatto ora con and bit a bit.
This commit is contained in:
Dario Sassi
2016-03-01 08:36:01 +00:00
parent 07e9914302
commit a4c92ffe5d
+5 -5
View File
@@ -1,13 +1,13 @@
//----------------------------------------------------------------------------
// EgalTech 2014-2015
// EgalTech 2014-2016
//----------------------------------------------------------------------------
// File : KeyProc.cpp Data : 27.07.15 Versione : 1.6g1
// File : KeyProc.cpp Data : 29.02.16 Versione : 1.6n9
// Contenuto : Funzioni per la gestione della chiave.
//
//
//
// Modifiche : 10.09.14 DS Creazione modulo.
//
// 29.02.16 DS Controllo prodotti con & (and bit a bit).
//
//----------------------------------------------------------------------------
@@ -26,7 +26,7 @@
using namespace std ;
//----------------------------------------------------------------------------
static const int MIN_DAYS = 16642 ; // giorni al 27/07/2015 dal 1/1/1970
static const int MIN_DAYS = 16831 ; // giorni al 31/01/2016 dal 1/1/1970
static const int N_STEP = 7 ;
//----------------------------------------------------------------------------
@@ -124,7 +124,7 @@ VerifyKey( const string& sKey, int nProd, int nVer, int nLev,
nKOpt1, nKOpt2, nKOptExpDays))
return KEY_ERR_KEYDECODE ;
// verifico dati prodotto
if ( nProd != nKProd)
if ( ( nProd & nKProd) != nProd)
return KEY_ERR_PROD ;
if ( nVer > nKVer)
return KEY_ERR_VER ;