Пример #1
0
        // 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);
        }
Пример #2
0
        // Token: 0x06000096 RID: 150 RVA: 0x00003708 File Offset: 0x00001908
        public bool parseEntity(uint[] datas)
        {
            if (datas.Length != 6)
            {
                return(false);
            }
            CRCUtil crcutil = new CRCUtil(datas);

            if (!crcutil.checkCRC())
            {
                return(false);
            }
            this.cardHead            = new CardHeadEntity(datas[0]);
            this.deviceHead          = new DeviceHeadEntity(datas[1]);
            this.userId              = datas[2];
            this.totalRechargeNumber = datas[3];
            this.totalReadNum        = datas[4];
            this.parseTheSixthData(datas[5]);
            return(true);
        }
Пример #3
0
        // Token: 0x06000071 RID: 113 RVA: 0x00003438 File Offset: 0x00001638
        public bool parseEntity(uint[] datas)
        {
            if (datas == null || datas.Length != 6)
            {
                return(false);
            }
            CRCUtil crcutil = new CRCUtil(datas);

            if (!crcutil.checkCRC())
            {
                return(false);
            }
            this.cardHead     = new CardHeadEntity(datas[0]);
            this.persistData1 = datas[1];
            this.persistData2 = datas[2];
            this.persistData3 = datas[3];
            this.persistData4 = datas[4];
            this.parseTheSixthData(datas[5]);
            return(true);
        }
Пример #4
0
        // Token: 0x06000045 RID: 69 RVA: 0x00002C08 File Offset: 0x00000E08
        public bool parseEntity(uint[] datas)
        {
            if (datas == null || datas.Length != 6)
            {
                return(false);
            }
            CRCUtil crcutil = new CRCUtil(datas);

            if (!crcutil.checkCRC())
            {
                return(false);
            }
            this.cardHead   = new CardHeadEntity(datas[0]);
            this.surplusNum = datas[1];
            this.userId     = datas[2];
            this.parseTheFourthData(datas[3]);
            this.parseTheFifthData(datas[4]);
            this.parseTheSixthData(datas[5]);
            return(true);
        }
Пример #5
0
        // Token: 0x0600017C RID: 380 RVA: 0x000056B0 File Offset: 0x000038B0
        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[24];
            if (!this.isEncryptCard())
            {
                WMMessageBox.Show(this.owner, "该卡为空白卡,请先初始化!");
                return(null);
            }
            for (byte b = 1; b < 7; b += 1)
            {
                byte[] array2 = new byte[4];
                int    num2   = 0;
                if (!RDIC100Reader.ATA_AccessPWD(0, b, this.pwd, this.ADDR))
                {
                    WMMessageBox.Show(this.owner, "读卡错误!");
                    return(null);
                }
                int num3 = RDIC100Reader.ATA_ReadCardRF32(array2, ref num2, this.ADDR);
                if (num3 != 1)
                {
                    WMMessageBox.Show(this.owner, "读卡错误!");
                    return(null);
                }
                array[(int)((b - 1) * 4)]     = array2[0];
                array[(int)((b - 1) * 4 + 1)] = array2[1];
                array[(int)((b - 1) * 4 + 2)] = array2[2];
                array[(int)((b - 1) * 4 + 3)] = array2[3];
            }
            if (beep)
            {
                RDIC100Reader.gSetBeep(100, this.ADDR);
            }
            uint[] array3 = base.byte2Uint32(array);
            uint[] array4 = new uint[]
            {
                array3[0],
                array3[1],
                array3[2],
                array3[3],
                array3[4],
                array3[5]
            };
            num = num * ICardReader.DATA_PASS1 + ICardReader.DATA_PASS2;
            for (int i = 0; i < array4.Length; i++)
            {
                array4[i] ^= num;
            }
            CRCUtil crcutil = new CRCUtil(array4);

            if (!crcutil.checkCRC())
            {
                WMMessageBox.Show(this.owner, "数据检查错误!");
                return(null);
            }
            return(array4);
        }
Пример #6
0
        // Token: 0x06000163 RID: 355 RVA: 0x00004E9C File Offset: 0x0000309C
        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);
            }
            int num2 = this.isValidCard(true);

            if (num2 == 1)
            {
                WMMessageBox.Show(this.owner, "空卡!");
                return(null);
            }
            if (num2 == -2)
            {
                WMMessageBox.Show(this.owner, "无效卡!");
                return(null);
            }
            byte[] array  = new byte[28];
            byte[] array2 = new byte[4];
            for (short num3 = 0; num3 < 7; num3 += 1)
            {
                num2 = MHCardReader.E5557_Direct_Read(0, num3, 1, this.pwd, array2);
                if (num2 != 0)
                {
                    WMMessageBox.Show(this.owner, "读卡错误!");
                    return(null);
                }
                array[(int)(num3 * 4)]     = array2[0];
                array[(int)(num3 * 4 + 1)] = array2[1];
                array[(int)(num3 * 4 + 2)] = array2[2];
                array[(int)(num3 * 4 + 3)] = array2[3];
            }
            MHCardReader.Beep_Option();
            MHCardReader.Led_Option();
            uint[] array3 = base.byte2Uint32(array);
            uint[] array4 = new uint[]
            {
                array3[1],
                array3[2],
                array3[3],
                array3[4],
                array3[5],
                array3[6]
            };
            num = num * ICardReader.DATA_PASS1 + ICardReader.DATA_PASS2;
            for (int i = 0; i < array4.Length; i++)
            {
                array4[i] ^= num;
            }
            CRCUtil crcutil = new CRCUtil(array4);

            if (!crcutil.checkCRC())
            {
                WMMessageBox.Show(this.owner, "CRC检查错误!");
                return(null);
            }
            return(array4);
        }