예제 #1
0
        private async Task InitMAD()
        {
            if (_MAD != null)
            {
                return;
            }

            // load sector 1, block 2 and 3
            Sector sector0 = GetSector(0);
            var    access  = await sector0.Access();

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

            Byte[] dataBlock1 = await sector0.GetData(1);

            Byte[] dataBlock2 = await sector0.GetData(2);

            _MAD = new MAD(dataBlock1, dataBlock2);
        }