Nuget packages geupdated
This commit is contained in:
@@ -6,12 +6,18 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
* 4e 6a 41 77 4e 6a 51 7a 51 44 4d 78 4d 7a 6b 79 5a 54 4d 30 4d 6d 55 7a 4d 47 35 4c 61 32 55 7a 51 31 46 30 52 33 64 46 5a 45 68 35 56 57 74 47 61 7a 5a 30 61 48 70 55 57 69 39 58 64 6b 78 4a 54 32 78 43 62 6b 74 58 52 58 46 57 63 30 5a 73 64 7a 41 39
|
||||
*/
|
||||
namespace SanSystem
|
||||
{
|
||||
class Dongle: IDisposable
|
||||
{
|
||||
uint FirmCode;
|
||||
uint ProductCode;
|
||||
public string SyncfusionKey ="";
|
||||
|
||||
Api cmApi;
|
||||
CmCredential cmCred;
|
||||
@@ -24,11 +30,13 @@ namespace SanSystem
|
||||
{
|
||||
#if !DEBUG
|
||||
this.FirmCode = 103086;
|
||||
this.ProductCode = ProductCode;
|
||||
#else
|
||||
this.FirmCode = 10;
|
||||
this.ProductCode = 1;
|
||||
#endif
|
||||
|
||||
this.ProductCode = ProductCode;
|
||||
|
||||
cmApi = new Api();
|
||||
cmCred = new CmCredential();
|
||||
cmAcc = new CmAccess2();
|
||||
@@ -54,18 +62,35 @@ namespace SanSystem
|
||||
cmBoxInfo = new CmBoxInfo();
|
||||
|
||||
CmGetBoxContentsOption boxOptions = new CmGetBoxContentsOption();
|
||||
boxOptions = CmGetBoxContentsOption.FirmItem;
|
||||
boxOptions = CmGetBoxContentsOption.AllEntries;
|
||||
|
||||
CmBoxEntry2[] tmpBoxContent;
|
||||
|
||||
tmpBoxContent = cmApi.CmGetBoxContents2(hcmse, boxOptions, this.FirmCode, cmBoxInfo);
|
||||
|
||||
CmEntryData[] pCmBoxEntry = (CmEntryData[])cmApi.CmGetInfo(hcmse, CmGetInfoOption.EntryData);
|
||||
|
||||
for(int i = 0; i < pCmBoxEntry.Length; i++)
|
||||
{
|
||||
switch(pCmBoxEntry[i].Ctrl & 0x0ffff)
|
||||
{
|
||||
case (uint)CodeMeter.GlobalEntryOption.ProtectedData:
|
||||
//var s = pCmBoxEntry[i].Data;
|
||||
SyncfusionKey = Encoding.ASCII.GetString(pCmBoxEntry[i].Data);
|
||||
//var len = pCmBoxEntry[i].DataLen;
|
||||
//var stringer = Encoding.ASCII.GetString(s);
|
||||
//Debugger.Break();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (CmBoxEntry2 boxes in tmpBoxContent)
|
||||
{
|
||||
if (boxes.ProductCode == this.ProductCode)
|
||||
{
|
||||
this.BoxContent = boxes;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
~Dongle()
|
||||
|
||||
Reference in New Issue
Block a user