Example #1
0
            public UESecurityCapabilities Decode(BitArrayInputStream input)
            {
                UESecurityCapabilities capabilities = new UESecurityCapabilities();

                capabilities.InitDefaults();
                BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1);

                input.ReadBit();
                capabilities.encryptionAlgorithms = input.ReadBitString(0x10);
                input.ReadBit();
                capabilities.integrityProtectionAlgorithms = input.ReadBitString(0x10);
                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    capabilities.iE_Extensions = new List <ProtocolExtensionField>();
                    int nBits = 0x10;
                    int num5  = input.ReadBits(nBits) + 1;
                    for (int i = 0; i < num5; i++)
                    {
                        ProtocolExtensionField item = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
                        capabilities.iE_Extensions.Add(item);
                    }
                }
                return(capabilities);
            }
Example #2
0
 public UESecurityCapabilities Decode(BitArrayInputStream input)
 {
     UESecurityCapabilities capabilities = new UESecurityCapabilities();
     capabilities.InitDefaults();
     BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1);
     input.ReadBit();
     capabilities.encryptionAlgorithms = input.ReadBitString(0x10);
     input.ReadBit();
     capabilities.integrityProtectionAlgorithms = input.ReadBitString(0x10);
     if (stream.Read())
     {
         input.skipUnreadedBits();
         capabilities.iE_Extensions = new List<ProtocolExtensionField>();
         int nBits = 0x10;
         int num5 = input.ReadBits(nBits) + 1;
         for (int i = 0; i < num5; i++)
         {
             ProtocolExtensionField item = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
             capabilities.iE_Extensions.Add(item);
         }
     }
     return capabilities;
 }