Esempio n. 1
0
        public bool validatePass(string cardPass)
        {
            Byte[] keya = new Byte[6] {
                0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe
            };
            string stNewPassHex = StrToHex(cardPass).Replace(" ", "");

            Byte[] pass    = passToHex(cardPass);
            int    iLoad   = E7Lib.fw_load_key(iDevice, 0, sectorNumber, ref keya[0]);
            int    iResult = E7Lib.fw_authentication(iDevice, 0, sectorNumber);


            if (0 == iResult)
            {
                return(true);
            }

            return(false);
        }
Esempio n. 2
0
        public string readCardID()
        {
            uint icard  = 0;
            int  result = E7Lib.fw_card(iDevice, 1,
                                        ref icard);

            Byte[] pass = new Byte[6] {
                0xff, 0xff, 0xff, 0xff, 0xff, 0xff
            };
            int iLoad = E7Lib.fw_load_key(iDevice, 0, sectorNumber, ref pass[0]);
            int ipass = E7Lib.fw_authentication(iDevice, 0, sectorNumber);

            if (0 == result)
            {
                return(icard.ToString());
            }
            else
            {
                return("");
            }
        }