unit mEncryptTypes;

interface

type
  _PEncryptData10 = ^_TEncryptData10;

  _TEncryptData10 = packed record
    SerialNo: Integer;
    // 序列号的16进制长度；
    SerialNoLength: Byte;
    ProductID: Byte;
    Editon: Byte;
    Licences: Byte;
    LimitSeconds: Cardinal;
    RunSeconds: Cardinal;
    LimitTimes: Word;
    RunTimes: Word;
    Key: array [0..23] of Byte;
    KeyLength: Byte;
  end;

  // 新版本加密信息带时间限制
  _PEncryptData20 = ^_TEncryptData20;

  _TEncryptData20 = packed record
    SerialNo: Integer;
    // 序列号的16进制长度；
    SerialNoLength: Byte;
    ProductID: Byte;
    Editon: Byte;
    Licences: Byte;
    LimitSeconds: Cardinal;
    RunSeconds: Cardinal;
    LimitTimes: Word;
    RunTimes: Word;
    Key: array [0..23] of Byte;
    KeyLength: Byte;
    // 20版本新增
    EncryptType: Byte;
    UserDate: Cardinal;
    LimitDate: Cardinal;
  end;

  PEncryptData = _PEncryptData20;
  TEncryptData = _TEncryptData20;

  TChangePasswordState = (cpsSuccessed, cpsFailed, cpsChanged);

  // 加密方式：常规，时间
  TEncryptType = (etNormal, etDate);

  PAuthFileHead20 = ^TAuthFileHead20;

  TAuthFileHead20 = packed record
    // 'SC Auth File'
    FileInfo: string[20];
    // 10/20/30
    Version: Integer;
  end;

  PAuthFileHead = ^TAuthFileHead;

  TAuthFileHead = packed record
    // 'SC Auth File'
    FileInfo: string[20];
    // 10/20/30
    Version: Integer;
    // 30加上长度
    Length: Integer;
  end;

const
  (*// 可运行时间
  DefaultRunHours = 200;
  // 可运行次数
  DefaultRunTimes = 50;
  // 授权节点数
  DefaultLicences = 30;*)
  // 认证文件头信息
  SAuthFileInfo = 'SC Auth File';
  // 版本
  SAuthFileVer20  = 20;
  SAuthFileVer  = 30;

  SUpdateFileInfo = 'SC Update File';
  // 版本
  SUpdateFileVer  = 10;

implementation

end. 

