public static FastArmorApRequest Parse(KrbFastArmor armor)
 {
     if (armor.armor_type.Value != (long)KrbFastArmorType.FX_FAST_ARMOR_AP_REQUEST)
         throw new Exception();
     var apReq = new AP_REQ();
     apReq.BerDecode(new Asn1DecodingBuffer(armor.armor_value.ByteArrayValue));
     return new FastArmorApRequest(apReq);
 }
        /// <summary>
        /// Parse raw PA_DATA type to PaTgsReq object.
        /// </summary>
        /// <param name="data">Raw PA_DATA</param>
        /// <returns>Reference to PaTgsReq object</returns>
        public static PaTgsReq Parse(PA_DATA data)
        {
            if (data.padata_type.Value != (long)PaDataType.PA_TGS_REQ)
            {
                throw new Exception();
            }
            AP_REQ apReq = new AP_REQ();

            apReq.BerDecode(new Asn1DecodingBuffer(data.padata_value.ByteArrayValue));
            return(new PaTgsReq(apReq));
        }
        public static FastArmorApRequest Parse(KrbFastArmor armor)
        {
            if (armor.armor_type.Value != (long)KrbFastArmorType.FX_FAST_ARMOR_AP_REQUEST)
            {
                throw new Exception();
            }
            var apReq = new AP_REQ();

            apReq.BerDecode(new Asn1DecodingBuffer(armor.armor_value.ByteArrayValue));
            return(new FastArmorApRequest(apReq));
        }
 /// <summary>
 /// Parse raw PA_DATA type to PaTgsReq object.
 /// </summary>
 /// <param name="data">Raw PA_DATA</param>
 /// <returns>Reference to PaTgsReq object</returns>
 public static PaTgsReq Parse(PA_DATA data)
 {
     if (data.padata_type.Value != (long)PaDataType.PA_TGS_REQ)
         throw new Exception();
     AP_REQ apReq = new AP_REQ();
     apReq.BerDecode(new Asn1DecodingBuffer(data.padata_value.ByteArrayValue));
     return new PaTgsReq(apReq);
 }