2ed2b944bd
aggiornamenti e aggiunte.
38 lines
1.5 KiB
C++
38 lines
1.5 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2014-2015
|
|
//----------------------------------------------------------------------------
|
|
// File : SELkLockId.cpp Data : 27.07.15 Versione : 1.6g8
|
|
// Contenuto : Dichiarazione funzioni per gestione/calcolo Id protezione,
|
|
// da macchina o da chiave hardware.
|
|
//
|
|
//
|
|
// Modifiche : 10.09.14 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
//-------------------------------------------------------------------------------
|
|
// Imposto il tipo di protezione
|
|
bool SetLockType( int nType) ;
|
|
// 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) ;
|
|
|
|
//-------------------------- 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" ;
|