using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace skyscraper8.Skyscraper.Security.AccessControl
{
	internal class NagravisionKey : MultipartKey
	{
		public NagravisionKey(uint nagravisionGroupid)
		{
			Group = nagravisionGroupid;
		}

		public uint Group { get; private set; }

		public bool SetHint(string keyType, byte[] key)
		{
			switch (keyType)
			{
				case "00":
					KeyA = key;
					return true;
				case "01":
					KeyB = key;
					return true;
				case "M1":
					Master = key;
					return true;
				default:
					return false;
					
			}
		}

		public byte[] Master { get; set; }

		public byte[] KeyB { get; set; }

		public byte[] KeyA { get; set; }
	}
}
