EgtLock 2.1e1 :

- aggiunte funzioni per leggere SN delle chiavi hardware.
This commit is contained in:
Dario Sassi
2019-05-13 09:30:15 +00:00
parent abc58f0de6
commit da6d08e3f1
5 changed files with 106 additions and 0 deletions
+21
View File
@@ -15,6 +15,7 @@
#include "stdafx.h"
#include "MachineId.h"
#include "DongleId.h"
#include "DongleSN.h"
#include "Obfuscate.h"
#include "/EgtDev/Include/EgtBase64.h"
#include "/EgtDev/Include/EgtCrc32.h"
@@ -131,3 +132,23 @@ ConvertLockId2ToScramKey( const string& sLockId2, string& sScramKey)
AddCrc32ToString( sScramKey) ;
return true ;
}
//----------------------------------------------------------------------------
bool
GetLockSN( int& nLockSN)
{
switch ( s_nLockType) {
default : // KEY_LOCK_TYPE_ANY
if ( GetDongleSN( nLockSN))
return true ;
else {
nLockSN = 0 ;
return false ;
}
case KEY_LOCK_TYPE_SW :
nLockSN = 0 ;
return false ;
case KEY_LOCK_TYPE_HW :
return GetDongleSN( nLockSN) ;
}
}