6243972bb8
- aggiornamento prototipi.
42 lines
1.7 KiB
C++
42 lines
1.7 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2014-2022
|
|
//----------------------------------------------------------------------------
|
|
// File : SELkLockId.cpp Data : 16.05.22 Versione : 2.4e3
|
|
// Contenuto : Dichiarazione funzioni per gestione/calcolo Id protezione,
|
|
// da macchina o da chiave hardware.
|
|
//
|
|
//
|
|
// Modifiche : 10.09.14 DS Creazione modulo.
|
|
// 16.05.22 DS Aggiunta gestione chiave di rete.
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
//-------------------------------------------------------------------------------
|
|
// Imposto il tipo di protezione
|
|
bool SetLockType( int nType) ;
|
|
// Forzo chiave di rete (se prevista protezione hardware)
|
|
bool SetNetHwKey( bool bNetHwKey) ;
|
|
// Recupero l'identificativo in chiaro della protezione
|
|
bool GetLockId( std::string& sLockId) ;
|
|
// Recupero l'identificativo cifrato della protezione
|
|
bool GetLockId2( std::string& sLockId) ;
|
|
// conversioni
|
|
bool ConvertLockIdToLockId2( const std::string& sLockId, std::string& sLockId2) ;
|
|
bool ConvertLockId2ToLockId( const std::string& sLockId2, std::string& sLockId) ;
|
|
bool ConvertLockIdToScramKey( const std::string& sLockId, std::string& sScramKey) ;
|
|
bool ConvertLockId2ToScramKey( const std::string& sLockId2, std::string& sScramKey) ;
|
|
// Serial Number della chiave hw (non di rete)
|
|
bool GetLockSN( int& nLockSN) ;
|
|
|
|
//-------------------------- Constants ----------------------------------------
|
|
// Tipo di protezione
|
|
const int KEY_LOCK_TYPE_ANY = 0 ;
|
|
const int KEY_LOCK_TYPE_SW = 1 ;
|
|
const int KEY_LOCK_TYPE_HW = 2 ;
|
|
// Inizio Id protezione hw
|
|
const std::string KEY_LOCK_HW_START = "EGTECH" ;
|