Files
Include/SELkKeyProc.h
T
Dario Sassi dacb205b73 Include :
- aggiunto corpo di ToString per interi
- aggiunte dichiarazioni per EgtLock (libreria statica).
2014-09-13 21:24:52 +00:00

42 lines
1.7 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2014-2014
//----------------------------------------------------------------------------
// File : SELkKeyProc.h Data : 10.09.14 Versione : 1.5i2
// Contenuto : Dichiarazione funzioni per la gestione della chiave.
//
//
//
// Modifiche : 10.09.14 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#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) ;
//-------------------------- Constants ----------------------------------------
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 ;