Пример #1
0
        private async Task InitMad2()
        {
            if (mad2 != null)
            {
                return;
            }

            // load sector 1, block 2 and 3
            var sector0 = GetSector(0);

            if (sector0.Access.MADVersion != AccessConditions.MADVersionEnum.Version2)
            {
                return;
            }

            var sector16 = GetSector(16);

            var dataBlock1 = await sector16.GetData(0);

            var dataBlock2 = await sector16.GetData(1);

            var dataBlock3 = await sector16.GetData(2);

            mad2 = new MAD2(dataBlock1, dataBlock2, dataBlock3);
        }
Пример #2
0
        private void Initialize()
        {
            sectors  = new Sector[MaxSectors];
            mad      = null;
            mad2     = null;
            cardInfo = null;

            ActiveSector = -1;
        }
Пример #3
0
        private void Initialize()
        {
            sectors = new Sector[MaxSectors];
            mad = null;
            mad2 = null;
            cardInfo = null;

            ActiveSector = -1;
        }
Пример #4
0
        private async Task InitMad2()
        {
            if (mad2 != null)
                return;

            // load sector 1, block 2 and 3
            var sector0 = GetSector(0);
            if (sector0.Access.MADVersion != AccessConditions.MADVersionEnum.Version2)
                return;

            var sector16 = GetSector(16);

            var dataBlock1 = await sector16.GetData(0);
            var dataBlock2 = await sector16.GetData(1);
            var dataBlock3 = await sector16.GetData(2);

            mad2 = new MAD2(dataBlock1, dataBlock2, dataBlock3);
        }