ac2da7f310
- aggiunta costante KEY_ERR_NETKEY_NOTFOUND = 9 - aggiornamento prototipi.
48 lines
2.1 KiB
C++
48 lines
2.1 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2014-2024
|
|
//----------------------------------------------------------------------------
|
|
// File : SELkKeyProc.h Data : 25.01.24 Versione : 2.6a1
|
|
// Contenuto : Dichiarazione funzioni per la gestione della chiave.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 10.09.14 DS Creazione modulo.
|
|
// 27.02.15 DS Agg. gestione chiavi hardware OxySec.
|
|
// 25.01.24 DS Agg. GetKeyLevelEx per scadenza assistenza.
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
//-----------------------------------------------------------------------------
|
|
bool MakeKey( int nProd, int nVer, int nLev, int nExpDays,
|
|
unsigned int nOpt1, unsigned int nOpt2, int nOptExpDays,
|
|
const std::string& sScramKey, std::string& sKey) ;
|
|
bool ReadKey( const std::string& sKey, const std::string& sScramKey,
|
|
unsigned int& nProd, unsigned int& nVer, int& nLev, int& nExpDays,
|
|
int& nOpt1, int& nOpt2, int& nOptExpDays) ;
|
|
int VerifyKey( const std::string& sKey, int nProd, int nVer, int nLev) ;
|
|
int GetKeyLevel( const std::string& sKey, int nProd, int nVer, int nLev,
|
|
int& nKLev, int& nKExpDays) ;
|
|
int GetKeyLevelEx( const std::string& sKey, int nProd, int nVer, int nLev,
|
|
int& nKLev, int& nKExpDays, int& nKAssExpDays) ;
|
|
int GetKeyOptions( const std::string& sKey, int nProd, int nVer, int nLev,
|
|
unsigned int& nKOpt1, unsigned int& nKOpt2, int& nKOptExpDays) ;
|
|
int GetCurrDay( void) ;
|
|
int GetMinDay( void) ;
|
|
|
|
//-------------------------- Constants ----------------------------------------
|
|
// Codici di ritorno
|
|
const int KEY_OK = 0 ;
|
|
const int KEY_ERR_MACHID = 1 ;
|
|
const int KEY_ERR_SCRAMKEY = 2 ;
|
|
const int KEY_ERR_KEYDECODE = 3 ;
|
|
const int KEY_ERR_PROD = 4 ;
|
|
const int KEY_ERR_VER = 5 ;
|
|
const int KEY_ERR_LEV = 6 ;
|
|
const int KEY_ERR_WRONG_TIME = 7 ;
|
|
const int KEY_ERR_TIME = 8 ;
|
|
const int KEY_ERR_NETKEY_NOTFOUND = 9 ;
|