/// <summary> /// 签到 /// </summary> /// <returns></returns> public void LoadWorkKeySign(StringBuilder sbWorkKey, StringBuilder sbMak, StringBuilder sbTrk = null) { StringBuilder sbReturn = new StringBuilder(); ZT_EPP.ZT_EPP_OpenCom(Convert.ToInt32(Settings.PasswordKeyBoard_COM), 9600); #region 01. PIN加密工作密钥 ZT_EPP.ZT_EPP_SetDesPara(0x05, 0x04); ZT_EPP.ZT_EPP_SetDesPara(0x00, 0x30); ZT_EPP.ZT_EPP_PinLoadWorkKey(0x02, 0x00, 0x00, sbWorkKey, sbReturn); #endregion #region 02. Mac密钥 ZT_EPP.ZT_EPP_SetDesPara(0x00, 0x20); ZT_EPP.ZT_EPP_SetDesPara(0x05, 0x04); ZT_EPP.ZT_EPP_SetDesPara(0x00, 0x30); ZT_EPP.ZT_EPP_PinLoadWorkKey(0x02, 0x00, 0x01, sbMak, sbReturn); #endregion if (sbTrk == null) { return; } #region 03. Track工作密钥 TRK ZT_EPP.ZT_EPP_SetDesPara(0x05, 0x04); ZT_EPP.ZT_EPP_SetDesPara(0x00, 0x30); ZT_EPP.ZT_EPP_PinLoadWorkKey(0x02, 0x00, 0x02, sbTrk, sbReturn); #endregion }
public void Open(string cardNum) { StringBuilder sbBlock = new StringBuilder(); StringBuilder sbReturn = new StringBuilder(); StringBuilder sbFlag = new StringBuilder(); ZT_EPP.ZT_EPP_OpenCom(Convert.ToInt32(Settings.PasswordKeyBoard_COM), 9600); ZT_EPP.ZT_EPP_ActivWorkPin(0x00, 0x00); ZT_EPP.ZT_EPP_SetDesPara(0x02, 0x00); ZT_EPP.ZT_EPP_SetDesPara(0x01, 0x30); ZT_EPP.ZT_EPP_SetDesPara(0x05, 0x01); ZT_EPP.ZT_EPP_SetDesPara(0x04, 0x10); ZT_EPP.ZT_EPP_PinLoadCardNo(new StringBuilder(cardNum.Substring(cardNum.Length - 13, 12))); ZT_EPP.ZT_EPP_OpenKeyVoic(0x02); ZT_EPP.ZT_EPP_PinStartAdd(6, 0x01, 0x01, 0, 20, sbReturn); }