mEncryptTypes.pas 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. unit mEncryptTypes;
  2. interface
  3. type
  4. _PEncryptData10 = ^_TEncryptData10;
  5. _TEncryptData10 = packed record
  6. SerialNo: Integer;
  7. // 序列号的16进制长度;
  8. SerialNoLength: Byte;
  9. ProductID: Byte;
  10. Editon: Byte;
  11. Licences: Byte;
  12. LimitSeconds: Cardinal;
  13. RunSeconds: Cardinal;
  14. LimitTimes: Word;
  15. RunTimes: Word;
  16. Key: array [0..23] of Byte;
  17. KeyLength: Byte;
  18. end;
  19. // 新版本加密信息带时间限制
  20. _PEncryptData20 = ^_TEncryptData20;
  21. _TEncryptData20 = packed record
  22. SerialNo: Integer;
  23. // 序列号的16进制长度;
  24. SerialNoLength: Byte;
  25. ProductID: Byte;
  26. Editon: Byte;
  27. Licences: Byte;
  28. LimitSeconds: Cardinal;
  29. RunSeconds: Cardinal;
  30. LimitTimes: Word;
  31. RunTimes: Word;
  32. Key: array [0..23] of Byte;
  33. KeyLength: Byte;
  34. // 20版本新增
  35. EncryptType: Byte;
  36. UserDate: Cardinal;
  37. LimitDate: Cardinal;
  38. end;
  39. PEncryptData = _PEncryptData20;
  40. TEncryptData = _TEncryptData20;
  41. TChangePasswordState = (cpsSuccessed, cpsFailed, cpsChanged);
  42. // 加密方式:常规,时间
  43. TEncryptType = (etNormal, etDate);
  44. PAuthFileHead20 = ^TAuthFileHead20;
  45. TAuthFileHead20 = packed record
  46. // 'SC Auth File'
  47. FileInfo: string[20];
  48. // 10/20/30
  49. Version: Integer;
  50. end;
  51. PAuthFileHead = ^TAuthFileHead;
  52. TAuthFileHead = packed record
  53. // 'SC Auth File'
  54. FileInfo: string[20];
  55. // 10/20/30
  56. Version: Integer;
  57. // 30加上长度
  58. Length: Integer;
  59. end;
  60. const
  61. (*// 可运行时间
  62. DefaultRunHours = 200;
  63. // 可运行次数
  64. DefaultRunTimes = 50;
  65. // 授权节点数
  66. DefaultLicences = 30;*)
  67. // 认证文件头信息
  68. SAuthFileInfo = 'SC Auth File';
  69. // 版本
  70. SAuthFileVer20 = 20;
  71. SAuthFileVer = 30;
  72. SUpdateFileInfo = 'SC Update File';
  73. // 版本
  74. SUpdateFileVer = 10;
  75. implementation
  76. end.