// Token: 0x0600019B RID: 411 RVA: 0x00005DC8 File Offset: 0x00003FC8 public override uint[] readCard(bool beep) { if (!this.checkDevice(true)) { return(null); } uint num = this.getCardID(false); this.pwd = base.getPassword(false, num); if (this.pwd == null) { return(null); } byte[] array = new byte[28]; if (QingtongReader.qt_T5557_readm(this.device, 0, 1, array) == 0) { WMMessageBox.Show(this.owner, "该卡为空白卡,请先初始化!"); return(null); } int num2 = (int)QingtongReader.qt_T5557_pwdreadm(this.device, 0, 7, this.pwd, array); if (num2 != 0) { WMMessageBox.Show(this.owner, "读卡错误!"); return(null); } if ((int)this.device > 0 && beep) { QingtongReader.dv_beep(this.device, 10); } uint[] array2 = base.byte2Uint32(array); uint[] array3 = new uint[] { array2[1], array2[2], array2[3], array2[4], array2[5], array2[6] }; num = num * ICardReader.DATA_PASS1 + ICardReader.DATA_PASS2; for (int i = 0; i < array3.Length; i++) { array3[i] ^= num; } CRCUtil crcutil = new CRCUtil(array3); if (!crcutil.checkCRC()) { WMMessageBox.Show(this.owner, "CRC检查错误!"); return(null); } return(array3); }
// Token: 0x0600019D RID: 413 RVA: 0x00005F40 File Offset: 0x00004140 public override int isValidCard(bool silent) { if (!this.checkDevice(true)) { return(-2); } this.pwd = base.getPassword(silent); if (this.pwd == null) { return(-1); } byte[] revbuffer = new byte[28]; if (QingtongReader.qt_T5557_readm(this.device, 0, 1, revbuffer) == 0) { return(1); } if (QingtongReader.qt_T5557_pwdreadm(this.device, 1, 1, this.pwd, revbuffer) == 0) { return(2); } return(-1); }
// Token: 0x060001A0 RID: 416 RVA: 0x000060C0 File Offset: 0x000042C0 public override int clearAllData(bool beep, bool initialize) { if (!this.checkDevice(true)) { return(-2); } this.pwd = base.getPassword(beep); if (this.pwd == null) { return(-1); } byte[] array = new byte[28]; int num = (int)QingtongReader.qt_T5557_readm(this.device, 0, 7, array); if (num != 0) { num = (int)QingtongReader.qt_T5557_pwdreadm(this.device, 0, 7, this.pwd, array); if (num == 0) { num = (int)QingtongReader.qt_T5557_Config(this.device, 1, this.pwd, 32, 0, 0, 7, 0); } } if (num == 0) { num = (int)(QingtongReader.qt_T5557_writem(this.device, 1, 1, new byte[4], 0) + QingtongReader.qt_T5557_writem(this.device, 2, 1, new byte[4], 0) + QingtongReader.qt_T5557_writem(this.device, 3, 1, new byte[4], 0) + QingtongReader.qt_T5557_writem(this.device, 4, 1, new byte[4], 0) + QingtongReader.qt_T5557_writem(this.device, 5, 1, new byte[4], 0) + QingtongReader.qt_T5557_writem(this.device, 6, 1, new byte[4], 0) + QingtongReader.qt_T5557_writem(this.device, 7, 1, new byte[4], 0)); } num = (int)QingtongReader.qt_T5557_read(this.device, 0, array); if (num == 0) { for (byte b = 1; b < 7; b += 1) { byte[] array2 = new byte[4]; num = (int)QingtongReader.qt_T5557_read(this.device, b, array2); if (num != 0) { break; } if (base.byte2Uint32(array2)[0] != 0U) { num = -1; break; } } if (num == 0) { if (beep) { QingtongReader.dv_beep(this.device, 10); } if (initialize) { this.initializeCard(); } } else { WMMessageBox.Show(this.owner, "清除数据失败,请手工清除!"); } return(num); } return(num); }