Exemplo n.º 1
0
        private async Task InitMad()
        {
            if (mad != null)
            {
                return;
            }

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

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

            var dataBlock1 = await sector0.GetData(1);

            var dataBlock2 = await sector0.GetData(2);

            mad = new MAD(dataBlock1, dataBlock2);
        }
Exemplo n.º 2
0
        private void Initialize()
        {
            sectors = new Sector[MaxSectors];
            mad = null;
            mad2 = null;
            cardInfo = null;

            ActiveSector = -1;
        }
Exemplo n.º 3
0
        private async Task InitMad()
        {
            if (mad != null)
                return;

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

            var dataBlock1 = await sector0.GetData(1);
            var dataBlock2 = await sector0.GetData(2);

            mad = new MAD(dataBlock1, dataBlock2);
        }