Пример #1
0
        public RestrictionEntry(byte[] value)
        {
            var element = new Asn1Element(value)[0];

            for (var i = 0; i < element.Count; i++)
            {
                var entry = element[i];

                switch (entry.ContextSpecificTag)
                {
                case 0:
                    Type = entry[0].AsInt();
                    break;

                case 1:
                    Restriction = new LsapTokenInfoIntegrity(entry[0].Value);
                    break;
                }
            }
        }
Пример #2
0
        public RestrictionEntry Decode(Asn1Element sequence)
        {
            var element = sequence[0];

            for (var i = 0; i < element.Count; i++)
            {
                var entry = element[i];

                switch (entry.ContextSpecificTag)
                {
                case 0:
                    RestrictionType = entry[0].AsInt();
                    break;

                case 1:
                    Restriction = new LsapTokenInfoIntegrity(entry[0].Value);
                    break;
                }
            }

            return(this);
        }