using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using skyscraper5.Mpeg2;
using skyscraper5.Skyscraper.IO;
using skyscraper5.Skyscraper.Plugins;

namespace skyscraper5.Dvb.SystemSoftwareUpdate.Descriptors
{
	[SkyscraperPlugin]
	[TsDescriptor(0x06,"UNT")]
    class TargetSmartcardDescriptor : TsDescriptor
    {
        public TargetSmartcardDescriptor(byte[] buffer)
        {
            MemoryStream ms = new MemoryStream(buffer, false);
            SuperCaSystemId = ms.ReadUInt32BE();
            SmartCardNumber = BitConverter.ToString(ms.ReadBytes(ms.GetAvailableBytes())).Replace("-", "");
        }

        public string SmartCardNumber { get; set; }

        public uint SuperCaSystemId { get; private set; }
    }
}
