Files
Include/SELkKeyProc.h
DarioS b3d649894f Include :
- aggiornamenti per migliore gestione delle chiavi di rete.
2023-05-30 10:22:05 +02:00

44 lines
1.8 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2014-2015
//----------------------------------------------------------------------------
// File : SELkKeyProc.h Data : 27.07.15 Versione : 1.6g1
// Contenuto : Dichiarazione funzioni per la gestione della chiave.
//
//
//
// Modifiche : 10.09.14 DS Creazione modulo.
// 27.02.15 DS Agg. gestione chiavi hardware OxySec.
//
//----------------------------------------------------------------------------
#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 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 ;